Webocreation

Monday, March 28, 2011

Display alert box on click in jquery




<html>
<head>
<script type="text/javascript" src="jquery-1.4.2.js">script>
<script type="text/javascript">
$(document).ready(function(){
$("a").click(function(event){
alert("Redirecting you to jQuery.com!","Alert Dialog");
});
});
script>
head>
<body>
<a href="http://jquery.com/">Click here to know about jQuerya>
body>
html>
 
 
Click to View Demo  


simple example of javascript and jquery, onclicking the link it will redirect to the other pages,
redirecting code to the other pages after clicking in the link

No comments:

Post a Comment