Grey out submit button on html form until text is inserted
How to grey out the submit button on a HTML form until a text is inserted:
Insert the following into the <head>-section of your page:
and the following into your <html>-section:
<form name="form1" action="http://www.theitcommunity.com/" method="get" /> <input type="text" id="title" name="search" value="" onkeyup = "check()" /> <input type="submit" value="submit" id="submitForm" disabled="disabled" /> </form>
and you are done, as soon as one character (other than a space) is entered the text field, the submit button becomes active.
Was this article helpful? Then please donate to keep The IT Community alive...
If you found this article helpful please share it, comment and help others by writing your own article.
Translate this page:
Articles found in the same category: