Popup A New Window with JavaScript

Here's a example of popping up a window.

Click Me to popup a window.

Here's the code:

<p>
<span id="xyz" style="border:solid thin black">Click Me</span>
to popup a window.
</p>
var xyz = document.getElementById("xyz");
xyz.onclick = f1;
function f1() {
  var linkbox = window.open( "pop_me.html", "poetry",
   "width=400,height=300,left=100"); 
  linkbox.focus();
}

https://developer.mozilla.org/en/DOM/window.open

2005-11
© 2005 by Xah Lee.