Code _javascript tips for pop-up windows with tips for identifying and canceling features

Source: Internet
Author: User
Tags visibility
I do not know what this function is called, looking for a long time also did not find, so to find everyone help, here thank you.

My purpose is that, on the basis of the original page, pop-up a new window, at the same time the original page is gray, and can not operate, must be a new window after the pop-up closed to restore the operation of the original window. Concrete effect a bit like lightbox and Thickbox, I now want to use thickbox, it can achieve this old page dimmed effect, but there is no way to implement the old page can not operate the problem. (in Firefox and IE can be used, ie showmodaldialog can achieve this purpose, but Firefox can not use AH)
<body onmousemove= "Moveit ()," onmouseup= "End ()," ondragstart= "return False," > <input type= "button" value= "off? "onclick=" back.style.background= ' #333333 '; back.style.filter= ' alpha (opacity=40) '; back.style.visibility= '; wnd.style.display= ' inline '; > <script> var isdrag = false; function Execcode () {var newwin = window.open (); NewWin.document.write (Tt.value); } var oldx=0,oldy=0; function init () {isdrag=true; Oldx=event.x; Oldy=event.y; Function End () {isdrag=false; function Moveit () {if (Isdrag) {var x =window.event.x; var y = window.event.y; Hdl.parentNode.style.left = parseint (Hdl.parentNode.style.left.replace ("px", "")) + (X-OLDX); Hdl.parentNode.style.top = parseint (Hdl.parentNode.style.top.replace ("px", "")) + (Y-oldy); OLDX = x; Oldy = y; } </script> <div id= "Back" onclick= "Cancels.click ();" Onmousemove= "Moveit ();" onmouseup= "End ();" > </div> <div id= "wnd" onmousedown= "init ();" Onmousemove= "Moveit ();" onmouseup= "End ();" > <div id= "HDL" ><b& gt; Windows </b></div> <div >  <input type= "button" value= "Determines onclick=" Opener=null;window.close ( "><input type=" button "value=" cancels "id=" cancels "onclick=" back.style.visibility= ' hidden '; wnd.style.display= ' None '; ' > </div> </div> </body>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Related Article

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.