HTML标签不显示(Dojo 1.8)(HTML Label Not Displaying (Dojo 1.8))
我正在使用Dojo 1.8动态创建一组复选框。 创建复选框后,我还设置了复选框的标签,但标签在网站上不可见,虽然我在Firebug中查看HTML时可以看到它。 我有什么想法我做错了吗? 我在这一点上看了太多代码并且无法弄清楚它是什么。 谢谢!
var checkboxContainer = dom.byId('divLayers');
var chkboxId = 'chk' + layer.id;
var chkbox = new dijit.form.CheckBox({
id: chkboxId,
checked: layer.visible,
onClick: lang.hitch(this, this.toggleLayerVisibility)
});
chkbox.placeAt(checkboxContainer);
chkbox.domNode.appendChild(domConstruct.create('label', { 'for': chkboxId, innerHTML: layer.name }));
I am creating a set of checkboxes dynamically using Dojo 1.8. After creating the checkbox, I'm also setting the label for the checkbox, but the label is not visible on the site, although I can see it when I look at the HTML in Firebug. Any