2014-09-28 51 views
0

我不确定如何获得jQuery手机中选定的单选按钮(我正在使用1.4.3版本)。只要点击其中一个单选按钮,checked属性就不会改变。实际上,当我检查元素时,我发现只有属性data-cacheval正在改变。使用这个属性来获得选定的单选按钮是否安全?这是我使用的单选按钮的代码:jquery mobile:获取选定的单选框

    <input type="radio" name="chkViewType" id="chkViewType2" data-mini="true"> 
        <label for="chkViewType2" data-mini="true">List</label> 
        <input type="radio" name="chkViewType" id="chkViewType1" data-mini="true"> 
        <label for="chkViewType1" data-mini="true">Map</label>     

回答