- 3/5
- 1
- 2
- 3
- 4
- 5
织梦DedeCMS视频教程买空间 租服务器 选网硕互联! 无忧站长工具,百度权重一键全查!
看到有些网站在登录的时候,点击文字或是点击复选框相应的输入框会变灰或启用,其实和这个原理是一样的,你可以轻易的给它加入这种功能,研究一下这款代码吧?
<html> <head> <meta http-equiv="Content-Type" mrc="text/html; charset=gb2312"> <title>点击文字checkbox被激活</title> </head> <script language="javascript"> function selectcheckbox() { document.form1.check1.checked=!document.form1.check1.checked; } </script> <body> <form name="form1" method="post"> <input type="checkbox" name="check1" value="0" style="cursor:hand" /> <a onclick="selectcheckbox()" style="cursor:hand">请点击我</a> </form> </body> </html>