我正在使用jQuery,並且我有一組單選按鈕都具有相同的名稱,但具有不同的值屬性。使用jQuery取消選擇一組單選按鈕
例如:
<input type = "radio" name = "thename" value="1"></input>
<input type = "radio" name = "thename" value="2"></input>
<input type = "radio" name = "thename" value="3"></input>
我想使它所以他們都未被選擇。我的頁面的當前狀態有一個點擊。我該怎麼做呢?
這個工作時,我添加了一個單引號後面的括號--- $('input [type =「radio」]')。 –
@JimEvans謝謝。我不確定爲什麼直到現在我還沒有看到。我已經編輯了答案,有結束報價。 – Kyle