1. <html>  
  2. <head>  
  3. <title>test</title>  
  4. <meta http-equiv="content-Type" content="text/html;charset=gb2312">  
  5. </head>  
  6. <body>  
  7. <form>  
  8.   
  9. 第一种:  
  10. 文字必须是label标签内,checkbox的id和<label>标签内的for=""中的名字必须相同.  
  11. <label for="check1">姓名</label>  
  12. <input type="checkbox" id="check1" value="123" name="name">  
  13. <label for="check2">密码</label>  
  14. <input type="checkbox" id="check2" value="456" name="name">  
  15.   
  16. 第二种:  
  17. 把文字和checkbox包含在<label>标签内  
  18. <label>测试<input type="checkbox" id="11" /></label>  
  19. </form>  
  20. </body>  
  21. </html