| 以下是引用片段: <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 (documents.cookie.length > 0) { offset = documents.cookie.indexOf(search) if (offset != -1) { offset += search.length end = documents.cookie.indexOf(";", offset); if (end == -1) end = documents.cookie.length; returnvalue=unescape(documents.cookie.substring(offset,end)) } } return returnvalue; } function loadpopup(){ if (get_cookie('popped')==''){ openwin() documents.cookie="popped=yes" } } </script> |
| 以下是引用片段: <script language='javascript1.2'> function js_callpage(htmlurl) { var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=2,right=0 ,width=800,height=421');return false; } </script> |
关注此文的读者还看过: