用document.body.clientWidth获取的宽度偶尔为0,刷新页面就可以获取到宽度,求大神帮忙
喝的酒少 2016-12-07 02:16:03 var entitytxt = new Ext.form.ComboBox({
id:'entitytxt',
store:estore,
width : document.body.clientWidth * (.30),
listWidth:document.body.clientWidth*(.40),
fieldLabel:'公司',
labelSeparator:':',
readOnly: false,
selectOnFocus:true,
triggerAction:'all',
displayField:'NAME',
mode:'local',