开发者

Add options to Dojo Dropdown list box

How to programmatically add an option to a dijit.form.Select . I've lo开发者_运维技巧oked all over the place and I'm not able to find it.


I think looking at the documentation you would see addOption

mySelect.addOption( { label: "new option", value: 1 } );


this question is old but I want to add some helpful information: you can use not only plain text for label. Additionally enhanced markup can be used

mySelect.addOption( { label: "<div><img src="images/girl.png"> Label </div>", value: 1 } );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜