How to create popup using javascript

Syntax (URL, windowName[, windowFeatures])
Example 1 ("","New popup window");

Example 2

<button onclick="openpopup()">Open My Popup</button>

function openpopup() {"","_blank", "toolbar=0,location=0,directories=0,scrollbars=0,resizable=0,top=500,left=500,width=400,height=400");

Window Features

status The status bar at the bottom of the window.
toolbar The standard browser toolbar, with buttons such as Back and Forward.
location The Location entry field where you enter the URL.
menubar The menu bar of the window
directories The standard browser directory buttons, such as What’s New and What’s Cool
resizable Allow/Disallow the user to resize the window.
scrollbars Enable the scrollbars if the document is bigger than the window
height Specifies the height of the window in pixels. (example: height=’350′)
width Specifies the width of the window in pixels.


Advanced popup use plugin like jquery ui

Author: bm on May 10, 2016
Category: java script

Your comment:

Your Name


Last articles