如何使用jQuery设置DropDownList的值? [英] How can I set the value of a DropDownList using jQuery?
本文介绍了如何使用jQuery设置DropDownList的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
$( #mydropdownlist)VAL( thevalue);
只需确保选项标签中的值与val方法中的值相匹配。
As the question says, how do I set the value of a DropDownList control using jQuery?
解决方案
$("#mydropdownlist").val("thevalue");
just make sure the value in the options tags matches the value in the val method.
这篇关于如何使用jQuery设置DropDownList的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文