论坛首页 Web前端技术论坛

dhtmlxTabbar TAB页按钮事件异常

浏览 2449 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2008-03-02  
main.html:
<script>
tabbar=new aj("a_tabbar","top");
tabbar.setImagePath("professional/dhtmlxTabbar/codebase/imgs/");
tabbar.enableTabCloseButton(true);
tabbar.loadXML("tabs2.xml");
</script>

tabs2.xml:
<?xml version="1.0"?>
<tabbar  hrefmode="ajax-html">
    <row>
       <tab id="b2" width='100px' selected="1" href="alfa2.html">SCBR 2</tab>
      </row>
</tabbar>
alfa2.html :
<html>
<head>
</head>
<body>
<table width="600">
<tr>
<td width="50%" valign="top">
<div id="gridbox" width="100%" height="250px" style="background-color:white;"></div>
</td>

</tr>
</table>
<hr>
<script>
function btn(){
alert("测试");
}
   mygrid = new dhtmlXGridObject('gridbox');
   mygrid.setImagePath("imgs/");
   mygrid.setHeader("Sales,Book Title Book Title Book Title Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
   mygrid.setInitWidths("50,150,120,80,80,80,80,200")
   mygrid.setColAlign("right,left,left,right,center,left,center,center")
   mygrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
   mygrid.enableEditEvents(false,true,true);
   mygrid.getCombo(5).put(2,2);
   mygrid.setColSorting("int,str,str,int,str,str,str,date")
   mygrid.setColumnColor("white,#d5f1ff,#d5f1ff")
   mygrid.init();
   mygrid.loadXML("grid1.xml");

</script>
<button onclick="javascript:btn();">
按钮
</button>
</body>
</html>

按上述代码 我的TAB页面正常显示,但点“按钮”时候,却报异常 “缺少对象”

哪位大侠能帮我分析下
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics