Here's a simple code the way I made it..
============================ ==================================
<html>
<head>
<title>How to create pop up window using java script in a Button</title>
<script language="javascript" type="text/javascript">
function popup()
{
// change with your target URL
popwindow = window.open("http://diary-of-programmer.blogspot.com/");
return false;
}
</script>
</head>
<body>
<input type="submit" value="pop up" onclick="return popup()"/>
</body>
</html>
<head>
<title>How to create pop up window using java script in a Button</title>
<script language="javascript" type="text/javascript">
function popup()
{
// change with your target URL
popwindow = window.open("http://diary-of-programmer.blogspot.com/");
return false;
}
</script>
</head>
<body>
<input type="submit" value="pop up" onclick="return popup()"/>
</body>
</html>
============================== ==================================
we create a javascript function that we called "popup()". The statement window.open(), accept url parameter.
and then to call the function we utilized the button's onclick event.
That's is my simple way to create a pop up function... if you find this post help you, please leave a comment bellow.
Thank you...
No comments:
Post a Comment