如何通过Jquery简单又快速的获取一组radio的取值呢?
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; }
相关推荐
lbPro0 2019-11-03
donghongbz 2019-10-19
89367741 2016-03-30
SinhaengHhjian 2016-01-25
89453862 2015-10-10
aaalk00 2015-03-31
xiuping0 2014-08-11
ruoyiqing 2014-03-18
mapdigit 2013-12-10
pplxh 2013-12-03
limengmeng00 2013-09-27
健康学习 2013-07-29
82483564 2013-04-28
88463368 2013-04-24
zhanghaibing00 2020-06-28
MaureenChen 2020-05-25