var ordovalue=$ ("#Radio1"). Is (": Checked")? " Male ":" Female "; Gets the radio button value var ochkvalue=$ ("#Checkbox1"). Is (": Checked")? " Married ":" unmarried ";//Gets the check box button value
Gender: <input id= "Radio1" name= "Rdosex" type= "Radio" value= "male"/> male <input id= "Radio2" name= "Rdosex" type= " Radio "value=" female "/> female <br/> marriage No: <input id=" Checkbox1 "type=" checkbox "/>
<TDAlign= "Center"valign= "Middle"> <inputtype= "checkbox"ID= "Selall"onclick= "Docheckclick ()"/>Select All</TD> <inputname= "Simunitcodelist"type= "checkbox"value= ' EA04 '/>& #20013;& #36135;& #33322; <inputname= "Simunitcodelist"type= "checkbox"value= ' EA08 '/>& #23665;& #19996; <inputname= "Simunitcodelist"type= "checkbox"value= ' EA06 '/>& #27743;& #35199; <inputname= "Simunitcodelist"type= "checkbox"value= ' EA16 '/>& #22235;& #24029; <inputname= "Simunitcodelist"type= "checkbox"value= ' EA17 '/>& #19978;& #33322; <inputname= "Simunitcodelist"type= "checkbox"value= ' EA12 '/>& #35199;& #21271;
function Docheckclick () { $ (' input[name= ' simunitcodelist "] '). attr (" Checked ", $ (" #selall "). Is (": checked "));
Original address: http://jxdwuao.iteye.com/blog/981567
JQ judgment button, check box is selected