Home > Web Front-end > JS Tutorial > javascript popup layer component (upgraded version)_javascript skills

javascript popup layer component (upgraded version)_javascript skills

WBOY
Release: 2016-05-16 18:06:48
Original
1065 people have browsed it

This time, we have used the organizational structure of the original code to re-enhance the function. Currently, there are still two small problems. The first one is that the custom pop-up layer under IE6 will not be able to cover the selection. It has not been added to the component yet. , you can add ifame to the custom div to cover it, and the pop-up layer that comes with the component can be covered. The second problem is that because it is absolutely positioned, it will not follow automatically when the browser window size is changed. You will know after you try it. Of course, there must be many problems, but these two that I think are more important are listed here for the time being and will be fixed later.

The following is the code, it has comments and can be run directly.
Online demohttp://demo.jb51.net/js/2011/js_popup_up/index.htm

Copy code The code is as follows:





lock page









  1. custom popup layer

  2. Built-in modal dialog box

  3. Advertising in the lower right corner


< /div>
div id="owp" style="width:300px;height:200px;">This is the second test example! x

Advertising in the lower right cornerx



















< ;br/>






















< ;br/>






















< ;br/>





















<script> <br>//The parameter con is the content of the pop-up box, confirm is whether a confirmation button is needed, whether wraphide displays the mask layer, wrap custom layer id <br>var dlg1=d_log({con:'<span>Confirm you want to Delete this file? </span>',confirm:'check'});//Automatically generated dialog <br>var dlg2=d_log({wraphide:'hide',wrapId:'owp'});//Customized dialog <br>var dlg3=d_log({wraphide:'hide',wrapId:'owp1',pos:'right-bottom'});//position of pos pop-up layer<br>var arr=[1,2,3 ,4,5,5,6,7,8]; <br>function check(){ <br>alert('test!'); <br>} <br></script>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template