Code of the floating layer dialog box in the lower right corner of js

Source: Internet
Author: User
Tip: you can modify some code before running

<html><head><title>Adv</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css"><!--body {margin: 0px;padding: 0px;overflow:hidden;}--></style></head><body onload=implement()><iframe id="fulliframe" LANG="utf-8" name="fulliframe" src="" width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0"></iframe><!-- START IFRAME LOADING --><script language="JavaScript" type="text/javascript">Frames ['fullframework']. location = url;</script><!-- END IFRAME LOADING --><!-- START POP UP NEW WINDOW --><script language="JavaScript" type="text/javascript">Var msgWinTop, msgWinLeft, msgWinWidth, msgWinHeight, mainWinHeight, mainWinWidth; var oTimer; var isFF = (navigator. userAgent. indexOf ("Firefox")> 0); var DEFAULT_MSGTITLE = "prompt"; var DEFAULT_MSGICON = ""; var DEFAULT_MSGCONTENT = "http://www.111cn.net/404.html"; var DEFAULT_MSGTIME = 3000; var browserName = navigator. appName; var tipTime; var control = false; var cnc = true; var cnc1 = true; var dW; // dest window objectv Ar dWDoc; // dest window document objectfunction resizeMainWin () {if (browserName = "Microsoft Internet Explorer") {msgWinHeight = parseInt (dWDoc. getElementById ("msgWin "). offsetHeight, 10); msgWinWidth = parseInt (dWDoc. getElementById ("msgWin "). offsetWidth, 10); mainWinWidth = dWDoc. body. clientWidth; mainWinHeight = dWDoc. body. clientHeight; dWDoc. getElementById ("msgWin "). style. top = mainWinHeight-msgWinH Eight + parseInt (dWDoc. body. scrollTop, 10); dWDoc. getElementById ("msgWin "). style. left = mainWinWidth-msgWinWidth + parseInt (dWDoc. body. scrollLeft, 10);} if (browserName = "Netscape") {// alert ("Netscape") ;}} function moveUpMsgWin () {try {if (parseInt (dWDoc. getElementById ("msgWin "). style. top, 10) <= (mainWinHeight-msgWinHeight + parseInt (dWDoc. body. scrollTop, 10) {window. clearInterval (oTimer); oTimer = win Dow. setTimeout ("holdOnMsgWin ()", tipTime); control = true; if (! Cnc) {delMove (); cnc = true ;}} msgWinTop = parseInt (dWDoc. getElementById ("msgWin "). style. top, 10); dWDoc. getElementById ("msgWin "). style. top = msgWinTop-2; // inframe = setInterval ("intervalframe ()", 10); intervalframe ();} catch (e) {// do nothing} function moveDownMsgWin () {try {if (parseInt (dWDoc. getElementById ("msgWin "). style. top, 10)> = (mainWinHeight + parseInt (dWDoc. body. scrollTop, 10) {closeMsgWin (); dWDoc. GetElementById ("msgWin "). removeNode (true);} msgWinTop = parseInt (dWDoc. getElementById ("msgWin "). style. top, 10); dWDoc. getElementById ("msgWin "). style. top = msgWinTop + 2; control = false;} catch (e) {// do nothing} function intervalframe () {GetObj ("msgWin "). onmouseover = new Function ("delMove ()"); GetObj ("msgWin "). onmouseout = new Function ("holdOnMsgWin ()");} function holdOnMsgWin () {// oTimer = window. setInterva L ("moveDownMsgWin ()", 1);} function closeMsgWin () {try {if (oTimer) {window. clearInterval (oTimer); dWDoc. body. removeChild (dWDoc. getElementById ('msgwin');} catch (e) {// do nothing} function popUp (dstWin, msgTitle, msgTime) {try {var objWin = eval (dstWin); if (isFF) {if (objWin.doc ument. body = null) {oTimer = window. setTimeout ("popUp (" "+ dstWin +" "," "+ msgTitle +" "," + msgTime + ")", 5); return ;}} else {I F (objWin.doc ument. readyState! = "Complete") {oTimer = window. setTimeout ("popUp (" "+ dstWin +" "," "+ msgTitle +" "," + msgTime + ")", 5); return ;}} if (oTimer) {window. clearTimeout (oTimer);} dstWin = eval (dstWin); if (dstWin = null) {return;} dW = dstWin. window; dWDoc = dW.doc ument; dWDoc. body. onresize = resizeMainWin; if (msgTitle = "") {tipTime = (msgTime = null )? DEFAULT_MSGTIME: msgTime;} var mw = dWDoc. createElement ("div"); mw. id = "msgWin"; mw. style. position = "absolute"; // mw. style. visibility = "hidden"; mw. style. Z index = "100"; mw. style. top = "0px"; mw. style. left = "0px"; mw. style. width = "260"; mw. style. height = "80px"; mw. style. filter = "alpha (opacity = 100)"; var ostr ="<div id='sd' >"; Ostr + =" "; ostr + ="</div>"; Ostr + ="<table border=0 cellpadding=0 cellspacing=0 width='262px' height='215px'>"; Ostr + ="<tr>"; Ostr + ="<td width='262px' height='215px' align=center>"; Ostr + ="<iframe src="+DEFAULT_MSGCONTENT+" frameborder=0 scrolling=no width='262px' height='215px'></iframe>"; Ostr + ="</td>"; Ostr + ="</tr>"; Ostr + ="</table>"; Mw. innerHTML = ostr; dWDoc. body. appendChild (mw); if (browserName = "Microsoft Internet Explorer") {msgWinTop = parseInt (mw. style. top, 10); msgWinLeft = parseInt (mw. style. left, 10); msgWinHeight = parseInt (mw. offsetHeight, 10); msgWinWidth = parseInt (mw. offsetWidth, 10); mainWinWidth = dWDoc. body. clientWidth; mainWinHeight = dWDoc. body. clientHeight; mw. style. top = parseInt (dWDoc. body. scrollTop, 10) + mainWinHe Ight + 10; // msgWinHeightmw. style. left = parseInt (dWDoc. body. scrollLeft, 10) + mainWinWidth-msgWinWidth-20; mw. style. visibility = "visible"; beginMove ();} if (browserName = "Netscape") {msgWinTop = parseInt (mw. style. top, 10); msgWinLeft = parseInt (mw. style. left, 10); msgWinHeight = parseInt (mw. offsetHeight, 10) + 100; msgWinWidth = parseInt (mw. offsetWidth, 10); mainWinWidth = window. innerWidth; mainWinHeight = wind Ow. innerHeight; mw. style. top = document.doc umentElement. scrollTop + window. innerHeight-document.getElementById ("msgWin "). offsetHeight + "px"; // msgWinHeightmw. style. left = window. innerWidth-document. getElementById ("msgWin "). offsetWidth-20 + "px"; mw. style. visibility = "visible"; beginMove () ;}} catch (e) {// do nothing }} function GetObj (objName) {if (document. getElementById) {return eval ('document. getElementById ("'+ ObjName +'") ');} else if (document. layers) {return eval ("document. layers ['"+ objName +"'] ");} else {return eval ('document. all. '+ objName) ;}} function hideDiv () {closemsgWin ();} function delMove () {if (control) {clearInterval (oTimer); window. clearTimeout (oTimer);} cnc = false;} function closemsgWin () {document. getElementById ("msgWin "). style. visibility = "hidden"; document. getElementById ("msgWin "). removeNod E (true) ;}var alpha_show = null; var step = 10; var cur_type = 100; function hide (the_layer) {clearTimeout (alpha_show); cur_type-= step; if (cur_type <0) {cur_type = 0; the_layer.filters.alpha.opacity = cur_type; alpha_show = null; the_layer.removeNode (true);} else {cursor = cur_type; alpha_show = setTimeout ("hide (" + the_layer.id + ")", 100)} function beginMove () {if (! Control) {oTimer = window. setInterval ("moveUpMsgWin ()", 1) ;}} var bubbles = 0; function implement () {if (bubbles = 0) {popUp ("window ","", 3000); bubbles = 1 ;}}</script><!-- END POP UP NEW WINDOW --></bODY></hTML>
Tip: you can modify some code before running

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.