【发布时间】:2011-04-03 22:39:17
【问题描述】:
我可以预测地读取 jQueryUI 单选按钮的值,但是,我无法以编程方式设置它。不管我用什么方法改变单选按钮的值,jQueryUI界面都不会更新它的界面。
<div id="radio">
<input type="radio" name="radio" value="true" checked="checked" />Yes
<input type="radio" name="radio" value="false" />No
</div>
<script type="text/javascript">
$('#radio').buttonset();
// One of the many ways that won't work.
$('[name="radio"]:radio:checked').val("false");
</script>
【问题讨论】:
-
你在哪里使用 jQuery UI?