0
我需要禁用和啓用三個單選按鈕,複選框從這個啓動開關如何啓用和禁用單選按鈕,複選框與JQ
jQuery("input:checked").each(function() {
var valore = jQuery(this).val();
if(str != ""){
str += " + ";
}
switch(valore)
{
case "1":
str += "casa";
if(num == "") num = "cooc €";
break;
case "2":
str += "Struttura";
if(num == "") num = "cccd";
break;
case "3":
str += "inserzione";
if(num == "") num = "ddds;";
break;
default:;
}
的Html
<input id="radio-01" value="3" name="radio" type="radio" class="rambo" />
<input id="radio-01" value="3" name="radio" type="radio" class="rambo" />
<input id="radio-01" value="3" name="radio" type="radio" class="rambo" />
<input id="radio-01" value="3" name="checkbox" type="checkbox" class="rambo" />
幫我 感謝建議
如果您將ID分配給任何對象,請確保所有ID在當前頁面中都是唯一的。 – reporter