Let see how to Call a popup window on button click event in Jquery.
Below is the Html code for this
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#Button2").click(function () {
var url = "http://www.google.com";
window.open(url, "Google", "height=600, width=800");
});
});
</script>
</head>
<body>
<div>
<input id="Button2" type="button" value="Redirect to different Website" />
</div>
</body>
</html>
Output:
No comments:
Post a Comment