中文(简体)
<!-- 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 nrn' + '<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>