{
fieldLabel : '日期',
xtype : 'textfield',
name : 'recordTime',
id : 'recordTime',
readOnly : true
}
怎么样给它的值设为系统当前时间呢?
[b]问题补充:[/b]
to:yourgame
我试过这样不行,也不知道是否是我自己有哪个地方写的不对。
现在我用获取客户端的时间替代了获取服务端时间。
[code="java"]
{
fieldLabel : '日期',
xtype : 'textfield',
name : 'recordTime',
id : 'recordTime',
readOnly : true,
value:new Date().format('Y-m-d H:i:s')
}
[/code]
在引入ext-all.js的jsp页面中调用服务器时间如下
[code="js"]
{
fieldLabel : '日期',
xtype : 'textfield',
name : 'recordTime',
id : 'recordTime',
readOnly : true,
value:Ext.currentTime
}[/code]