1、Ext.TabPanel简单使用
代码:
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } @section Header{ <script type="text/javascript"> Ext.onReady(function () { var tabs = new Ext.TabPanel({ renderTo: Ext.getBody(), 300, height: 150 }); tabs.add({ title: '标题1', html: '内容1' }); tabs.add({ id: Ext.id(), title: '标题2', html: '内容2', closable: true }); tabs.activate(0) }); </script> }
效果图: