这是在Extjs 中插入html 控件label! html: "<div><label id=‘howMany‘>您共选中了</label><br/></div>"获取label值:document.getElementById(‘howMany‘).innerText赋值label值:document.getElementById(‘howMany‘).innerText = "这是赋值"; document.getElementById(‘howMany‘).innerHTML var westPanelForm = new Ext.form.FormPanel({ id: ‘westPanelForm‘, width: 200, region: ‘west‘, border: false, height: 340, frame: true, layout: ‘form‘, items: [ { layout: ‘column‘, items: [{ layout: ‘form‘, width: 260, items: [{ baseCls: ‘x-plain‘, border: false, height:30, html: "<div><label id=‘howMany‘>您共选中了</label><br/></div>" }] }] }, { layout: ‘column‘, items: [gridPanelMd] } ] });
时间: 2024-07-29 06:51:37