Tip: you can modify some code before running
JavaScript form makes the button Gray code<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Form to make the button Gray code</title><meta http-equiv="content-type" content="text/html;charset=gb2312"></head><body><!--把下面代码加到<body>与</body>之间--><form action="http://www.111cn.net" method="post" name="form1" onsubmit="return CheckForm()"><input type="text" name="name"><input type="submit" name="submit1" value="提交"></form><script language="vbscript">Function CheckForm () form1.submit1. disabled = TrueCheckForm = TrueEnd Function</script><script language="javascript">Function my_submit () {document. form1.submit (); document. form1.submit1. disabled = true ;}</script><form action="http://www.111cn.net" method="post" name="form1"><input type="text" name="name"><input type="button" name="submit1" value="提交" onClick="javascript:my_submit();"></form><!--把下面代码加到<body>与</body>之间--><script language="javascript">Function submitonce (form1) {if (document. all | document. getElementById) {for (I = 0; I<form1.length;i++){var tempobj=form1.elements[i];if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")tempobj.disabled=true;}}}</script><form action="http://www.zzsky.cn" method="post" name="form1" onSubmit="submitonce(this)"><input type="text" name="name"><input type="submit" name="submit1" value="提交"></form></body></html>
Tip: you can modify some code before running