前几天接触了coolite感觉非常好的一个东西,自己在研项目也可以用,所以就开始研究。
实例网站:http://examples.coolite.com/
大家可以去看一下
下面带来的是coolite的Tab的动态绑定
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://images.cnblogs.com/dot.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
下面是调用这个JavaScript代码的过程
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
<ext:MenuItem ID="xiaomu" runat="server" Text="xiaomu">
<Listeners>
<Click Handler="addTab(#{TabPanel1}, 'google', 'http://www.google.com');" />
</Listeners>
</ext:MenuItem>
<Listeners>
<Click Handler="addTab(#{TabPanel1}, 'google', 'http://www.google.com');" />
</Listeners>
</ext:MenuItem>
这里面的google本身是一个参数,是创建新tab的ID,因为上文的我处理了JS函数,所以这里随便传值就OK了。
这样这实现了动态的调用。