You can use JavaScript to create popup windows. Popup windows are different to simply opening a new browser window.
If you only want to open a new browser window you can add the
target="_blank"
attribute within your <a>
tag. Popup windows however, are more powerful. Using JavaScript's window.open()
method, you can determine what the window looks like (i.e. size, whether it has scrollbars, status bars etc).Basic JavaScript Popup Script
Here is the basic script for generating a popup window:
<input type="button" value="Open a Popup Window" onclick="window.open('http://ihowmore.blogspot.ru/p/webmaster-tools.html','popUpWindow','height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');">
This code is best placed inside a function. But first things first. Here's an explanation of the above code.
The
window.open()
method takes three arguments: the URL of the new page, the name of the window, and the attributes of the window. The attributes are optional and should be quite self explanatory in the above example. You can change these to see how it affects the popup window.
One more popup widget with close button for blogger.
ReplyDeleteGet widget: http://knowledge333.blogspot.com/2013/12/online-popup-window-with-close-button.html