var loginForm = new Ext.form.FormPanel({
title:'表单提交示例',
labelWidth :100,//标签宽度
width : 400,
height:200,
frame : true,
labelSeparator :':',//分隔符
applyTo :'form',
items:[
new Ext.form.TextField({
id:'accountname',
fieldLabel:'客户名称',
name : 'account_name',
width : 200,
allowBlank : false,
blankText:'请填写客户名称'
}),
new Ext.form.DateField({
fieldLabel:'生产日期',
format:'Y-m-d',//显示日期的格式
width : 200,
name : 'create_time'
}),new Ext.form.TextField({
fieldLabel:'客户网站',
width : 200,
name : 'account_website'
}),new Ext.form.TextField({
fieldLabel:'客户邮箱',
width : 200,
name : 'account_email',
allowBlank:false,
vtype:'email',
vtypeText:'请输入正确的邮箱格式',
blankText:'请填写客户邮箱'
}),new Ext.form.TextField({
hidden:true,
width : 200,
fieldLabel:'',
hideLabel:true,
name : 'account_id'
})
],
buttons:[
new Ext.Button({
text : '确定',
handler : login
}),
new Ext.Button({
text : '取消',
handler : reset
})
]
})
loginForm.form.load({
url : 'accountselectbyid.php?account_id='+id,//请求的url地址
method:'GET',//请求方式
success:function(form,action){//加载成功的处理函数
},
failure:function(form,action){//加载失败的处理函数
}
});
加载的数据为
{success:true,data:{account_id:'82',account_name:'重庆市仓兴达科技有限公司',create_time:'2010-7-7',account_website:'www.baidu.com',account_email:'[email protected]'}}
account_name account_website account_email 这3个字段都可以成功加载 create_time 不能正确加载?日期类型的
fieldLabel:'生产日期',
format:'Y-m-d',//显示日期的格式
width : 200,
name : 'create_time'
})
{success:true,data:{account_id:'82',account_name:'重庆市仓兴达科技有限公司 ',create_time:'2010-7-7',account_website:'www.baidu.com',account_email:'[email protected]'}}
格式对的情况下,两处一样就可以了
并支持 弹窗 查询那种
有这样的Demo 吗
或者 有这样的例子吗
发个链接谢谢或者 我邮箱 [email protected]上面那个问题解决了
去掉看看是什么玩意儿,可能是你后便传来的数据没有格式化过导致是一个全球的timespan