0
我有有一個包含的項目數jQuery的單選按鈕,新手的問題
<input type="radio" id="rb169">
<input type="radio" id="rb170">
<input type="radio" id="rb171">
如何使用jQuery來遍歷所有以「RB」開頭的所有單選按鈕的ID值單選按鈕的表確定選擇哪個#號碼?
我有類似:
return_type = $("input:radio["@name=rb*"]:checked").val();
if (return_type == undefined) {
alert("you did not select a radio button");
}
但是,這並不工作,我選擇的方式。這是正確的嗎?