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(), width: 300, height: 150 }); tabs.add({ title: '標題1', html: '內容1' }); tabs.add({ id: Ext.id(), title: '標題2', html: '內容2', closable: true }); tabs.activate(0) }); </script> }
效果圖: