Javascript pop-up drag window _ javascript tips

Source: Internet
Author: User
You can see on many Web pages that a new window is displayed when you click somewhere on the web page, and you can drag it on the screen at will. This article introduces the javascript pop-up drag window, if you have any need, you can refer to the pop-up window that can be dragged. it can be seen on many Web pages. it is very user-friendly. the pop-up and drag windows can be implemented through a piece of javascript code below, if you don't talk much about it, paste the code directly.

   
  
 Pop-up window that can be dragged Script function showPopup () // The pop-up layer {var objDiv = document. getElementById ("popDiv"); objDiv. style. top = "50px"; // set the distance between the pop-up layer and the upper boundary. style. left = "200px"; // set the distance between the pop-up layer and the left boundary to objDiv. style. width = "300px"; // set the width of the pop-up layer objDiv. style. height = "200px"; // set the height of the pop-up layer objDiv. style. visibility = "visible";} function hidePopup () // Close the layer {var objDiv = document. getElementById ("popDiv"); objDiv. style. visibility = "hidden";} script  

Close modification operation

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.