<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <ul> <li><input type="radio" value="11" />男</li> <li><input type="radio" value="22" />女</li> <li><input type="radio" value="33" />女司机</li> </ul> <!--radio = document.getElementsByTagName('input') [<input type="radio" name="g" value="11">, <input type="radio" name="g" value="11">, <input type="radio" name="g" value="11">] radio[1] <input type="radio" name="g" value="11"> xo = radio[1] <input type="radio" name="g" value="11"> xo.value "11" xo.checked false xo.checked = true true--> </body> </html>
案例三:克隆