Wednesday, December 21, 2011

Click for a dialog

If you're tired of creating new HTML pages just to display two or three lines of text, try displaying your text in a pop-up dialog box.
Basic idea is to use the JavaScript alert() function to display the information when a button (or a link) is clicked.
Before:
<form method="POST">

<input type=reset value="Test">

</form>
After:

Note the addition of OnClick="alert( 'hello, world!' );"
<form method="POST">

<input type=reset value="Test" OnClick="alert( 'hello, world!' );">

</form>

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Best Web Hosting