如何設置內容窗格widgetid屬性?Dojo:設置內容窗格widgetid屬性
new dijit.layout.ContentPane({
content: "<p>Optionally set new content now</p>",
style: "height:125px",
// I can set id, but widgetid will differ
id: 'someId',
// no effect
widgetid: 'myWidgetId',
// still fail
widgetId: 'how can I set you, God damn it?!'
}
我需要它用於dijit.byId()的內容窗格查找,因爲此方法通過它的widgetid屬性獲取元素。