home  CODE LIBRARY  : code-js-alert 
Web and Email Hosting
More Information about our Web and Email Hosting Solution. Linux Web HostingWindows

Javascript Alert Message

This little script allows you to show your users a JavaScript-generated alert message when they click on a form button or on any anchor tag. This can be very useful for notifying your users when a page was last updated or even notifying them that they are about to send information over the internet.

For an example of this, click on the items below: (note: the example requires JavaScript to be enabled in your web browser)

Click here to be alerted.

Adding this neat little trick to your page elements is as simple as adding the following snippet of code to whichever element you want to use it with:

onClick='alert("Your Text Here!")'

So for example, the code for an input button would look like:

<input type="button" value="Click here to be alerted" onClick='alert("Your Text Here!")'>

And the code for an anchor tag would look like:

<a href="file.html" onClick='alert("Your Text Here!")'>Click Here</a>
Email and Web Hosting by Internet Connection 2004-2007 ©
Contact IC Support via AIM!  Our SN is ICSupportDesk