Jquery老的版本
var_name = $(“input[@name='radio_name']:checked”).val();
Jquery 1.3以后的版本
var_name = $(“input[name='radio_name']:checked”).val();
区别是老版本有个@.
//获得选中的radio值 function select(object){ var td = object.childNodes[0].childNodes[0]; var temp = td.defaultValue; var temp2 = temp.substring(1,temp.length-1); var xmgd = temp2.split(","); var xmgdID = xmgd[0]; var dajyjl_xmbh = xmgd[1]; alert(dajyjl_xmbh); document.getElementById("xmgd_id").value= xmgdID; document.getElementById("dajyjl_xmbh").value= dajyjl_xmbh; return true; }