JavaScript form makes the button Gray code

Source: Internet
Author: User
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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.