HTML Form with onClick Code : Button : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Button »

 

HTML Form with onClick Code



<HTML>
<BODY>
<FORM> 
Enter Your Name:  <INPUT TYPE=text NAME=userName  VALUE="Name"
Enter Your Age:  <INPUT TYPE=text NAME=userAge  VALUE="12">
<INPUT TYPE=button VALUE="Check Age" 
onClick='var status = (userAge.value >= 21"an adult" "a minor"
alert(userName.value + " is " + status + ".");'>
</FORM>
</BODY>
</HTML>
           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Button