Html Tips and Tricks

Monday, May 24, 2004

Javascript: Dialog Boxes

Here is a normal button that does nothing:



This code made the button:
<form method="POST">
<input type=reset value="Button">
</form>

If you want the button to show a dialog box after being clicked, edit the code to this:
<form method="POST">
<input type=reset value="Alert" OnClick="alert( This is an alert! )">
</form>


That results in:




NEED EXTRA HELP? HAVE A SUGGESTION? HAVE SOMETHING TO ADD? PLEASE POST COMMENTS WHILE LOOKING AT ALL THESE USEFUL HTML TIPS AND TRICKS. THANK YOU!

13 Comments:

Post a Comment

<< Home


Hit Counter