问题描述
我在页面上引用了一个fromPanel的add.js、页面上为什么不显示、请各位帮忙、初学extjs代码:vartxtBmdm=newExt.form.TextField({filedLabel:"部门序号",name:"dept.bmdm",allowBlank:false,blankText:"部门序号不能为空!"//为空时显示的提示信息});vartxtName=newExt.form.TextField({filedLabel:"部门名称",name:"dept.dname",allowBlank:false,blankText:"部门名称不能为空!"});/*varstore=newExt.data.Store({proxy:proxy,reader:reader,autoLoad:true});*/varform=newExt.form.FormPanel({//renderTo:Ext.getBody(),title:"新增部门",autoHeight:true,frame:true,items:[txtBmdm,txtName],url:"deptAdd.action",baseParams:{method:"addDept"},method:"post",renderTo:"newDept",button:[{text:"新建",handler:function(){varjson={success:function(f,action){Ext.Msg.alert("成功",action.result.msg);},failure:function(){Ext.Msg.alert("失败","对不起,新建部门失败!!!");}};form.getForm().submit(json);}},{text:"重置",handler:function(){varbasicForm=form.getForm();basicForm.reset();}}]});页面代码:<divid="newDept"></div>