2014-09-28 52 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>     

回答