我需要一个组件在顶栏的下一行。我这样编码,
tbar: [{
xtype: 'textfield'
id:'fname'
},'-',{
xtype: 'textfield'
,id: 'lname'
},'<row>',{
xtype: 'textfield'
,id:'mob'
}]
这在chrome、firefox和ie7+浏览器中运行良好,但在ie7中不起作用。有人能纠正我的代码吗。
最佳答案
xtype:“textfield”后面没有逗号。
IE7在JavaScript中对逗号非常敏感。
tbar: [{
xtype: 'textfield'
,id:'fname'
},'-',{
xtype: 'textfield'
,id: 'lname'
},'<row>',{
xtype: 'textfield'
,id:'mob'
}]
编辑:我做了这个提琴,它可以在所有浏览器中工作:
http://jsfiddle.net/MG3fS/3/