
我的JSP文件用IE8运行的时候,提示我缺少对象。我是用ext写的
<scripttype="text/javascript"src="extjs/ext-base.js"></script><scripttype="text/javas...
<script type="text/javascript" src="extjs/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var formPanel = new Ext.form.FormPanel({
title:'LOGIN',
id:'lg',
frame:true,
autoHeight:true,
width:300,
renderTo:Ext.getBody(),
labelAlign:'center',
items:[{
xtype:'textfield',
id:'username',
blankText:'请输入用户名',
allowBlank:false,
fieldLabel:'用户名',
maxLength:16},
{
xtype:'number',
id:'password',
fieldLabel:'密码',
allowBlank:false,
blankText:'请输入密码',
maxLength:10
}],
buttons:[{
xtype:'button',
text:'登录',
scope:this,
handler:login
},{
xtype:'button',
text:'重填',
scope:this,
handler:reset
}]
});
提示的错误在var formPanel = new Ext.form.FormPanel这行 展开
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var formPanel = new Ext.form.FormPanel({
title:'LOGIN',
id:'lg',
frame:true,
autoHeight:true,
width:300,
renderTo:Ext.getBody(),
labelAlign:'center',
items:[{
xtype:'textfield',
id:'username',
blankText:'请输入用户名',
allowBlank:false,
fieldLabel:'用户名',
maxLength:16},
{
xtype:'number',
id:'password',
fieldLabel:'密码',
allowBlank:false,
blankText:'请输入密码',
maxLength:10
}],
buttons:[{
xtype:'button',
text:'登录',
scope:this,
handler:login
},{
xtype:'button',
text:'重填',
scope:this,
handler:reset
}]
});
提示的错误在var formPanel = new Ext.form.FormPanel这行 展开
1个回答
展开全部
从没用过handler属性,不知道你给他赋得值是什么对象。
也没用过xtype:'number',只用过xtype:'numberfield'
也没用过xtype:'number',只用过xtype:'numberfield'
追问
handler后面跟的是函数名login和reset,函数我没有贴出来,就是一个提交函数和一个重置函数;xtype是我的误用,但是和缺少Ext对象比起来,这些都不算什么
追答
把那几项改正之后,你的代码我试了,可以执行,没错误
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询