0
單擊(數量)單選按鈕時,必須啓用數字類型框。單擊(速率)單選按鈕時禁用。單選按鈕啓用號碼類型
我看來
<input type="radio" class="radioBtn" name="quantity" value="yes" id="rad1" onclick="radio()"/>PRN
<input type="radio" class="radioBtn" name="quantity" value="no" id="rad2" onclick="radio()" />Qty
<input type="number" name="someid" id="textfield" disabled/>
我的javascript
$(".radioBtn").click(function radio() {
$("#textfield").attr("disabled", true);
if ($("input[name=quantity]:checked").val() == "yes") {
$("#textfield").removeattr("disabled");
}
});
我的鏈接可以查看和js
除了幾個錯誤,使用內聯和jQuery事件處理程序等,這裏的問題到底是什麼? – adeneo
我的連接視圖和js的鏈接 – ashwanth
單擊單選按鈕時,我無法禁用文本框 – ashwanth