In this tutorial, we will display alert box to prompt message using jQuery. In the below program , html page contains a "a href" link. On clicking this link ,a alert box prompt message "redirecting...." and when we click "Ok" button , it will redirect us to linked page. Note here, the redirection is due to link not due to alert box or jQuery.
Description of the program :
// Your code here
The above code checks whether the page loading is finished and if finished then it executes the code in the block.
The code given below is used to display alert box on clicking link :
alert("Redirecting you to jQuery.com!");
Posted on: July 24, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles