<SCRIPT> <!-- window.open ('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') //寫成一行 --> </SCRIPT> |
<SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.html') --> </SCRIPT> |
<SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.html', 'newwindow', 'height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no') //寫成一行 --> </SCRIPT> |
<html> <head> <script LANGUAGE="JavaScript"> <!-- function openwin() { window.open ("page.html", "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") //寫成一行 } //--> </script> </head> <body onload="openwin()"> …任意的頁面內容… </body> </html> |
<script LANGUAGE="JavaScript"> <!-- function openwin() { window.open ("page.html", "newwindow", "height=100, width=100, top=0,left=0,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") //寫成一行 window.open ("page2.html", "newwindow2", "height=100, width=100, top=100, left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") //寫成一行 } //--> </script> |
<script language="javascript"> <!-- function openwin() {window.open("page.html","","width=200,height=200") } //--> </script> |
<script language="JavaScript"> function closeit() {setTimeout("self.close()",10000) //毫秒} </script> |
<FORM> <INPUT TYPE='BUTTON' VALUE='關閉' onClick='window.close()'> </FORM> |
<html> <head> <SCRIPT LANGUAGE="JavaScript"> function openwin() {OpenWindow=window.open("", "newwin", "height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no"); //寫成一行 OpenWindow.document.write("<TITLE>例子</TITLE>") OpenWindow.document.write("<BODY BGCOLOR=#ffffff>") OpenWindow.document.write("<h1>Hello!</h1>") OpenWindow.document.write("New window opened!") OpenWindow.document.write("</BODY>") OpenWindow.document.write("</HTML>") OpenWindow.document.close()} </SCRIPT> </head> <body> <a href="#" onclick="openwin()">打開一個窗口</a> <input type="button" onclick="openwin()" value="打開窗口"> </body> </html> |
<script> function openwin() {window.open("page.html","","width=200,height=200")} function get_cookie(Name) {var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset,end)) } } return returnvalue; } function loadpopup(){ if (get_cookie('popped')==''){ openwin() document.cookie="popped=yes" } } </script> |