Affordable Web Hosting with Excellent Customer Support internet connection free month hosting

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, yhe 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>