Ext.onReady(function(){ 
new Ext.Panel({renderTo:"hello",title:"CONTAINER",width:500,height:200,layout:"accordion",layoutConfig: {animate: true },items:[{title:"1",html:"1-CONTENT"},{title:"2",html:"2-CONTENT"},{title:"3",html:"3-CONTENT"}]});});照着文档复制过来的一小段代码,用firebug调试,显示错误b is null
 Ext.DomHelper=function(){var s=null,j=...(){return("DragDrop "+this.id)}}})(); ext-all.js (第 7 行),出了这段代码,有好几段代码都会出现这种情况,我是新学的,求高手解答,是ext-all有错误吗

解决方案 »

  1.   

    body里面,你得有一个id为hello的元素
      

  2.   

    <script language="javascript" src="extjs/ext-base.js"></script>
    <script language="javascript" src="extjs/ext-all.js"></script>
    <script language="javascript" src="extjs/ext-lang-zh_CN.js"></script>
    <link href="resources/css/ext-all.css" rel="stylesheet" type="text/css" />
    都加进来了么?
      

  3.   

    好吧,我是很菜的新手,JParser说对了- -我一直以为是ext版本不对或者什么的,谢谢了啊,回答问题这么及时
      

  4.   

     renderTo:"hello",//这个hello必须是页面div的id