【发布时间】:2015-01-04 02:24:51
【问题描述】:
我不断收到错误消息“对象不支持属性或方法'checkboxradio'”。我正在使用最新的 jquery mobile 1.4.3、Visual Studio 2013 和 Internet Explorer 11。我的主要目标是将其放入后面的 c# 代码中,以根据从数据库中检索到的信息更改单选按钮的选择。
我也尝试了以下
$('input[id*=radio-choice-h-Corporate').attr('checked',true).checkboxradio('refresh');
$('#radio-choice-h-Corporate').prop('checked',false).checkboxradio('refresh');
这些都不行
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Customer Type:</legend>
<input name="radioCustomerType" id="radio-choice-h-Personal" value="1" type="radio">
<label for="radio-choice-h-Personal">Personal</label>
<input name="radioCustomerType" id="radio-choice-h-Corporate" value="2" type="radio">
<label for="radio-choice-h-Corporate">Corporate</label>
</fieldset>
</div>
<script type="text/javascript">
$('#radio-choice-h-Corporate').attr("checked", false).checkboxradio("refresh");
</script>
【问题讨论】:
标签: jquery mobile radio-button