大家好,我做了一个简单的表单,加载表单的数据时,使用ie 可以加载成功,表单中的字段可以显示值,但是使用firefox就加载失败,不知道是什么原因,下面是我的源码,大家帮我看一下。
<html>
<head>
<title>第四章练习</title>
</head>
<link rel="stylesheet" type="text/css" href="../../ext-2.3.0/resources/css/ext-all.css"/>
<script type="text/javascript" src="../../ext-2.3.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-2.3.0/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
//下面是用来检查Ext 的头文件 是否正常加载
//Ext.MessageBox.alert("提示","测试Ext的头文件是否加载成功");
Ext.BLANK_IMAGE_URL="../../ext-2.3.0/resources/images/default/s.gif";
Ext.QuickTips.init();
var prodectForm = new Ext.form.FormPanel({
title:'表单加载例子',
applyTo:'form',
frame:true,
width:250,
height:230,
labelSeparator:':',
labelAlign:'right',
labelWidth:80,
items:[
new Ext.form.TextField({
fieldLabel:'名称',
value:'U 盘'
}),
new Ext.form.NumberField({
fieldLabel:'价格',
value:'100'
}),
new Ext.form.DateField({
fieldLabel:'购买日期',
value: new Date(),
format:'Y-m-d',
readOnly:true
}),
new Ext.form.TextArea({
fieldLabel:'产品简介',
width:150,
height:80,
name:'productName',
id:'productName'
})
],
buttons:[
new Ext.Button({
text:'加载产品简介',
handler:function()
{
prodectForm.form.load({
waitMsg:'正在加载产品简介信息',
waitTitle:'提示',
url:'http://localhost:8080/ExtTest/loadForm.jsp',
method:'GET',
success:function(form,action)
{
Ext.MessageBox.alert("提示","产品信息加载成功!!!");
},
failure:function(form,action)
{
Ext.MessageBox.alert("提示","产品信息加载失败!!!"+action.failureType+"=="+action.result);
}
})
}
})
]
});
});
</script>
<body>
<table>
<tr>
<td>
</td>
</tr>
<tr>
<td width=100>
</td>
<td>
<div id="form"></div>
</td>
</tr>
</table>
</body>
</html>
<html>
<head>
<title>第四章练习</title>
</head>
<link rel="stylesheet" type="text/css" href="../../ext-2.3.0/resources/css/ext-all.css"/>
<script type="text/javascript" src="../../ext-2.3.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-2.3.0/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
//下面是用来检查Ext 的头文件 是否正常加载
//Ext.MessageBox.alert("提示","测试Ext的头文件是否加载成功");
Ext.BLANK_IMAGE_URL="../../ext-2.3.0/resources/images/default/s.gif";
Ext.QuickTips.init();
var prodectForm = new Ext.form.FormPanel({
title:'表单加载例子',
applyTo:'form',
frame:true,
width:250,
height:230,
labelSeparator:':',
labelAlign:'right',
labelWidth:80,
items:[
new Ext.form.TextField({
fieldLabel:'名称',
value:'U 盘'
}),
new Ext.form.NumberField({
fieldLabel:'价格',
value:'100'
}),
new Ext.form.DateField({
fieldLabel:'购买日期',
value: new Date(),
format:'Y-m-d',
readOnly:true
}),
new Ext.form.TextArea({
fieldLabel:'产品简介',
width:150,
height:80,
name:'productName',
id:'productName'
})
],
buttons:[
new Ext.Button({
text:'加载产品简介',
handler:function()
{
prodectForm.form.load({
waitMsg:'正在加载产品简介信息',
waitTitle:'提示',
url:'http://localhost:8080/ExtTest/loadForm.jsp',
method:'GET',
success:function(form,action)
{
Ext.MessageBox.alert("提示","产品信息加载成功!!!");
},
failure:function(form,action)
{
Ext.MessageBox.alert("提示","产品信息加载失败!!!"+action.failureType+"=="+action.result);
}
})
}
})
]
});
});
</script>
<body>
<table>
<tr>
<td>
</td>
</tr>
<tr>
<td width=100>
</td>
<td>
<div id="form"></div>
</td>
</tr>
</table>
</body>
</html>