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');
精彩评论