Tuesday, December 12

Introduction to Form Field Validation With Javascript

Google+ Pinterest LinkedIn Tumblr +

<form method=”post” action=”http://www.somewebsite.com/cgi-bin/file.exe” onsubmit=”return validate()”>
   
<table>
        <tbody>
            <tr>
               
<td>First Name:
</td>
<td>
<input type=”text” name=”firstName” id=”fn” </td>
            </tr>
            <tr>
               
<td>Last Name:
</td>
<td>
<input type=”text” name=”lastName” id=”ln” </td>
            </tr>
            <tr>
               
<td>Email:
</td>
<td>
<input type=”text” name=”email” id=”em” </td>
            </tr>
            <tr>
               
<td>Message:
</td>
<td>
<textarea name=”msg” cols=”30″ rows=”3″
id=”msg”>

</td>
            </tr>
        </tbody>
   
</table>
   
<button type=”submit”>Send
</button>
</form>
 

Share.

About Author

Leave A Reply