JS control: XP prompt box

xiaoxiao2021-03-06  14

/ ** --------------------------------------------- ------------ *

*

@ param 1 [Here you can control the time of the 'prompt box "automatically shut down]

*

@ param 2 [You can control the speed of the control to scroll up]

*

@ param 3 [here you can control the content displayed in 'prompt box "]

* ------------------------------------------------- ---------------- * /

//Window.onLoad = js_msg_getmsg; window.onload = js_msg_showmsg; window.onResize = js_msg_resizediv; window.onerror = function () {}

// If there is a content in the "message prompt box", "message prompt" function js_msg_showmsg () {if ("js_showflag") == "1") {JS_MSG_GETMSG (); // clearparament (); setCookie ("JS_SHOWFLAG", "0");}}

/>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<< <<<<<<<

// global variable var js_msg_divHeight, js_msg_docHeight, js_msg_objTimer, js_msg_i = 0; // display "class MSN message box" function js_msg_getMsg () {var divTop, divLeft, divWidth, docWidth; try {divTop = parseInt (document.getElementById ( " eMeng "). style.top, 10) divLeft = parseInt (document.getElementById (" eMeng "). style.left, 10) js_msg_divHeight = parseInt (document.getElementById (" eMeng "). offsetHeight, 10) divWidth = parseInt ( document.getElementById ( "eMeng") offsetWidth, 10) docWidth = document.body.clientWidth;. js_msg_docHeight = document.body.clientHeight;. document.getElementById ( "eMeng") style.top = parseInt (document.body.scrollTop, 10) js_msg_docHeight 10;.. // js_msg_divHeight document.getElementById ( "eMeng") style.left = parseInt (document.body.scrollLeft, 10) docWidth - divWidth document.getElementById ( "eMeng") style.visibility = "visible" js_msg_objtimer = window.setInterval ("JS_MSG_MOVEDIV ()", 10)} catch (e) {}}}}

// Window change the size, "class MSN message prompt box" position adjustment function js_msg_resizediv () {var div width, docwidth; js_msg_i = 1 if (js_msg_i> 1000) js_msg_closediv () @ @ param 1 [here you can control the 'prompt block 'automatic turn off time] try {js_msg_divHeight = parseInt (document.getElementById ( "eMeng"). offsetHeight, 10) divWidth = parseInt (document.getElementById ( "eMeng"). offsetWidth, 10) docWidth = document.body.clientWidth ; js_msg_docHeight = document.body.clientHeight;.. document.getElementById ( "eMeng") style.top = js_msg_docHeight - js_msg_divHeight parseInt (document.body.scrollTop, 10) document.getElementById ( "eMeng") style.left = docWidth - DivWidth PARSEINT (Document.Body.Scrollleft, 10)} Catch (e) {}} // "Class MSN Message Tips" Mobile Function JS_MSG_MOVEDIV () {VAR Divtop; Try {IF (Parseint (Document.getElementByid) "eMeng"). style.top, 10) <= (js_msg_docheight - js_msg_divheight parseint (Document.Body.Scrolltop, 10))) {WINDOW.CLEARINTERVAL (JS_MSG_OBJTIMER) JS_MSG_OBJTIMER = WINDOW.SETIN TERVAL ("JS_MSG_RESIZEDIV ()", 1)} Divtop = PARSEINT ("EMENG"). style.top, 10) Document.getElementByid ("EMENG"). style.top = divletop - 1 @ param 2 [You can control the speed of the control to scroll up]} catch (e) {}}

// "Class MSN Message Prompt Box" Function JS_MSG_Closediv () {document.getlementByid ('Emeng'). Style.visibility = 'hidden'; if (js_msg_objtimer) WINDOW.CLARINTERVAL (JS_MSG_OBJTIMER)}

/ / Generate the basic framework of "class MSN message prompt" Function JS_MSG_BUILDILDIV () {var TitleValue = ""; var message = getCookie ("js_message"); if (GetCookie ("js_titleflag" == "0") TitleValue = "System Tips:"; Else TitleValue = System Warning: "; Document.write ("