开发者

How to select dropdown item (select option) in google closure?

on jQuery i could just do $('#idOfSelectTag').val('so开发者_如何学编程meValue');

How to do the same in google closure?


The closest equivalent would be:

goog.dom.forms.setValue(
    goog.dom.getElement('idOfSelectTag'), 'someValue');


Thanks to Derek Slager from closure mailing list. The correct way :

goog.dom.forms.setValue(goog.dom.getElement('idOfSelectTag'),'someValue'); 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜