点击按钮弹出新窗口网页,在弹出的新窗口网页中带关闭页面按钮,结合自己的网站需求来修改即可。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>js控制新窗口弹出与关闭_武鸣人</title> <style type="text/css"> <!-- body { font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px} A{ COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none } A:hover{ COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline } a:active{ font: 9pt "宋体"; cursor: hand; color: #FF0033 } --> </style> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <center><font color=red face="隶书" size=6>跳出说明窗口</font></center> <center> <table border=0 bordercolor=blue borderlight=green style="border-collapse: collapse" cellpadding="0" cellspacing="0"> <tr><td align=center></td></tr> <tr><td align=center><SCRIPT LANGUAGE="Javascript"> // Please enter the number of people in your database var peepNum = 6 // Please edit your page attributes here var pageAtr = new Array(1) pageAtr[0] = "#000000" // Pop Up Profile background color pageAtr[1] = "#ffffff" // Pop Up Profile text color //武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) // Please edit the names of the people in your profiles var peepName = new Array(peepNum) peepName[1] = "Jason" // First person's name peepName[2] = "John" // Second person's name peepName[3] = "Joe" // Etc... peepName[4] = "Ryan" peepName[5] = "Jessica" peepName[6] = "Mrs. Jacobson" // Please edit the people's positions var peepPos = new Array(peepNum) peepPos[1] = "Master programmer :P" // First person's position peepPos[2] = "The Pascal Guy" // Second person's position peepPos[3] = "Soccer guy and mudder" // Etc... peepPos[4] = "Serves no useful function" peepPos[5] = "She complains a lot" peepPos[6] = "The *snicker snicker* teacher" //武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) // Please edit the personal quote var peepAd = new Array(peepNum) peepAd[1] = "9th grade really bites" // First person's quote peepAd[2] = "Graphix are easier" // Second person's quote peepAd[3] = "I like to play muds" // Etc... peepAd[4] = "Huh? What about what?" peepAd[5] = "I don't understand..." peepAd[6] = "There's too much screwing around here" // *#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#) // *#) Please stop editing at this point *#) // *#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#)*#) function makePupWin(){ PUP = window.open('','PUP','width=300,height=160,toolbar=0,directories=0,status=1,menu=0,scrollbars=no,resizable=no,copyhistory=no,location=0'); } // This is a bit hard to edit if you don't do javascript. // Here you can edit the HTML of the profile window // Keep in mind you'll get errors if you use " without a slash (\") function makePUP(num){ makePupWin(); PUP.document.write("<HTML>\n<HEAD>\n<TITLE>Profile for: " + peepName[num] + "</TITLE>"); PUP.document.write("\n</HEAD>\n<BODY BGCOLOR=\"" + pageAtr[0] + "\" TEXT=\"" + pageAtr[1] + "\">"); PUP.document.write("\n<CENTER>\n<TABLE WIDTH=\"250\" BORDER=\"1\" HEIGHT=\"100\">\n<TR>\n<TD>Name</TD><TD><CENTER>" + peepName[num] + "</CENTER></TD>"); PUP.document.write("\n<\TR>\n<TR>\n<TD>Title:</TD><TD><CENTER>" + peepPos[num] + "</CENTER></TD>"); PUP.document.write("\n<\TR>\n<TR>\n<TD>Quote:</TD><TD><CENTER>" + peepAd[num] + "</CENTER></TD>"); PUP.document.write("\n<\TR>\n</TABLE>\n<FORM>\n<INPUT TYPE=\"button\" VALUE=\"Close Profile\" onClick=\"self.close();\">\n</FORM>\n</BODY>\n</HTML>"); PUP.status=(peepName[num] + "'s Pop Up Profile"); PUP.document.close(); }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </SCRIPT> <CENTER> <FORM> <INPUT TYPE="button" VALUE="Jason's profile" onClick="makePUP(1)"> <INPUT TYPE="button" VALUE="John's profile" onClick="makePUP(2)"> <INPUT TYPE="button" VALUE="Joe's profile" onClick="makePUP(3)"> <INPUT TYPE="button" VALUE="Ryan's profile" onClick="makePUP(4)"> <INPUT TYPE="button" VALUE="Jessica's profile" onClick="makePUP(5)"> <INPUT TYPE="button" VALUE="Mrs. Jacobson's profile" onClick="makePUP(6)"> </FORM> </CENTER> </td></tr></table></center> <center> <SCRIPT LANGUAGE="JavaScript"> <!-- hide function goHist(a) { history.go(a); } //--> </script></center> </body> </html>
本文来自武鸣人网站,转载请注明出处