中文(繁体)
<!-- http://www.downcodes.com/js --> <!-- bbs http://www.downcodes.com/bbs--> <!-- 完整的 HTML 程式碼如下 --> < html> <HEAD><title>彈出視窗產生器</title> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin functiongenerate(form){ page = document.inputForm.page.value;工具列= document.inputForm.toolbars.checked;滾動屬性 = document.inputForm.scrollit.checked;位置= document.inputForm.locations.checked; statusbars = document.inputForm.statusbars.checked;選單列= document.inputForm.menubars.checked;可調整大小 = document.inputForm.resizeable.checked;寬度 = document.inputForm.width.value; if (!width) width = screen.width;高度 = document.inputForm.height.value; if (!height) height = screen.height; howto = document.inputForm.howtoopen.options[document.inputForm.howtoopen.selectedIndex].value; center = document.inputForm.center.checked;開始=“<”; if(howto == 'body') { otherOutput = start + "!--步驟2: 修改BODY區域為以下程式碼: -->nn" + start + "BODY onLoad="javascript:popUp(' " + 頁+ "')">"; } if(howto == 'link') { otherOutput = start + "!--步驟2: 將下面的程式碼貼到BODY區域內: -->nn" + start + "A HREF="javascript :popUp('" + page + "')">開啟彈出視窗" + start + "/A>"; } if(howto == 'button') { otherOutput = start + "!--步驟2: 將下面的程式碼貼到BODY區域內: -->nn" + start + "form>n" + start + "輸入類型=按鈕值="開啟彈出視窗" onClick="javascript:popUp('" + page + "')">n" + start + "/form>"; } scriptOutput = start + '!--使用下面程式碼需要兩步驟: -->rnrn' + '<!--步驟1:複製程式碼到HEAD區域內 -->r n rn' + '<HEAD>rnrn' + start + 'SCRIPT LANGUAGE="JavaScript">rn' + 'function pop' + 'Up(URL) {nday = new Date();nid = day.getTime();n'; scriptOutput += "eval("page" + id + " = window.open(URL, '" + id + "', '" + ((工具列) ? "toolbar=1," : "工具列=0,") + ((scrollprops) ? "scrollbars=1," : "scrollbars=0,") + ((locations) ? "location=1," : "location=0,") + (( statusbars) ?「狀態列= 1,」:「狀態列= 0,」)+((選單)?「選單= 1,」:「選單= 0,」)+((可調整大小)?「可調整大小= 1”:"可調整大小= 0") + ((寬度) ?",寬度=" + 寬度:"") + ((高度) ?",高度=" + 高度:"") + ((中心) ?",左=" + ( (螢幕寬度- 寬度) / 2) : "") + ((中心) ? ",top = " + ((螢幕高度- 高度) / 2) : "") + "');"); n}n// 結束 -->n" + start + "/sc" + "ript>n";輸出 = scriptOutput + "nn" + otherOutput + 'nn' + start +'!-- 腳本大小:0.73 KB --'+'>'; document.mail.source.value = 輸出; document.mail.source2.value = 輸出;取消編碼(); } // 結束 --> </SCRIPT> <BODY BGCOLOR="BLACK" VLINK="BLUE" ALINK="BLUE"> <CENTER> <P ALIGN=CENTER> <TABLE WIDTH="500" CELLPADDING="0" CELLSPACING="0" BORDER="0"> <TR> <TD BGCOLOR="024D6D" VALIGN=TOP> </TD> </TR> <TR> <TD WIDTH="100%" BGCOLOR="WHITE" VALIGN =TOP> <P> </TD> </TR> <TR> <TD WIDTH="100%" BGCOLOR="WHITE" VALIGN=TOP><CENTER> <TABLE WIDTH="677" CELLPADDING="0" CELLSPACING ="0" BORDER="0"> <TR> <TD ROWSPAN="10" WIDTH="100%" BGCOLOR="WHITE" VALIGN=TOP> <P> <TABLE WIDTH="678" CELLPADDING="2" CELLSPACING="0" BORDER="0"> <TR> <TD WIDTH="1%" BGCOLOR="#E4E9E9" VALIGN=TOP> <P> </P> <P> </TD> <TD WIDTH= "99%" VALIGN=TOP> <divalign="center"> <table width="475" border="0" cellspacing="0" cellpadding="4"> <tr> <td width="467"> < font size="2"><strong>彈出視窗產生器</strong></font><br> </td> </tr> <tr> <tdalign=center> <table width="100% " cellpadding =0 cellspacing=0 border=0> <tr> <td width="100%"align=center> <表單名稱=inputForm> <表格寬度=466 cellpadding=2 cellspacing=0 border=0> <tr> <td width="462"> <table cellpadding=8 cellspacing=0 border=0 bgcolor="#E9E9E9" width="458"> <tr> <td colspan=2 bgcolor="#FFFFFF"><font face= "宋體" size="2">這個生成器將幫助我們自動產生一個彈出視窗的程式碼,請您把下面表單的內容填寫完整之後,就會按「產生程式碼」按鈕出現程式碼了!</font> </ td> </tr> <tr> <td width="169" bgcolor="#F9F9F宋9"><font face="體" size="2">檔案名稱或網址</font></td> <td width="257" bgcolor="#F9F9F9"> <font face="宋體" size="2"> <input type=text name=page size=20> <br> (檔名或http:// . ...)</font></td> </tr> <tr> <td width="169"><font face="宋體" size="2">工具列:</font></ td > <td width="257"> <font face="Arial、Helvetica、sans-serif" size="2"> <input type=checkbox name=toolbars> 是</font></td> </tr > <tr> <td width="169" bgcolor="#F9F9F9"><font face="宋體" size="2">滾動條:</font></td> <td width="257" bgcolor = "#F9F9F9"> <font face="Arial、Helvetica、sans-serif" size="2"> <input type=checkbox name=scrollit> 是</font></td> </tr> <tr> < td width="169"><fontface="宋體"size="2">網址列:</font></td> <tdwidth="257"> <fontface="Arial、Helvetica、sans- serif" size="2"> <input type=checkbox name=locations> 是</font></td> </tr> <tr> <td width="169" bgcolor="#F9F9F9"><字體="宋體" size="2">狀態列:</font></td> <td width="257" bgcolor="#F9F9F9"> <font face="Arial、Helvetica、sans-serif" size= "2" > <input type=checkbox name=statusbars>是</font></td> </tr> <tr> <td width="169"><font face="宋體" size="2">選單:< /font></td> <td width="257"> <fontface="Arial、Helvetica、sans-serif" size="2"> <input type=checkbox name=menubars> 是</font ></td > </tr> <tr bgcolor="#F9F9F9"> <td width="169"><font face="體" size="2">可否調整大小:</font></td > <td width ="257"> <font face="Arial、Helvetica、sans-serif" size="2"> <input type=checkbox name=resizeable> 是</font></td> </tr> <tr> < td width="169"><fontface="宋體"size="2">寬度:</font></td> <td width="257"> <fontface="Arial、Helvetica , sans-serif" size ="2"> <input type=text name=width size=4> (以像素為單位)</font></td> </tr> <tr bgcolor="#F9F9F9"> <td width="169 "><fontface="宋體"size="2">高度:</font></td> <td width="257"><fontface="Arial、Helvetica、sans-serif" size="2"> <input type=text name=height size=4>(以像素為單位)</font></td> </tr> <tr> <td width="169"><font face="宋體" size= "2">如何開啟視窗:</font></td> <td width="257"> <fontface="Arial、Helvetica、sans-serif" size="2"> <選擇名稱=howtoopen> <option value="button">透過按鈕<option value="link">透過連結<option value="body">自動</select> </font></td> </tr> <tr bgcolor="#F9F9F9 "> <td width="169"><font face="宋體" size="2">在視窗中央打開?</font></td> <td width="257" > <font face="Arial 、Helvetica、sans-serif" size="2"> <input type=checkbox name=center> 是</font></td> </tr> <tr> <td colspan=2 > <center> <input type =button value="生成程式碼" onClick="javascript:generate();" name="button"> <input type="reset" value="清除" name="reset"> </center></td> </tr> </table></td> </tr> </ table> </form> <p> <center> <form name="mail" method="POST"> <textarea name="source" rows=12 cols=50> 建站學院http://www.downcodes.com ,提供該效果,希望大家喜歡! <br><br><br> <p><font color=red>//作者:閃電兒,網址:http://www.downcodes.com</font></p>