JS pop-up window plug-in zDialog simple usage example, jszdialog

Source: Internet
Author: User

JS pop-up window plug-in zDialog simple usage example, jszdialog

This article describes the simple usage of the JS pop-up plug-in zDialog. We will share this with you for your reference. The details are as follows:

Because no element can be displayed to framesettings, the following operations are performed on index.htm:

Index.htm

<Script language = "javascript" src = "JS/zDialog. js "type =" text/javascript "> </script> <script language =" javascript "src =" JS/zDialog/zDrag. js "type =" text/javascript "> </script> // introduce the corresponding interface <script language =" javascript "type =" text/javascript "> // on its subpage medium, call this method to open the corresponding interface function openDialog (title, url) {var dlg = new Dialog (); // define the Dialog object dlg. model = true; dlg. width = 500; // define the length of dlg. height = 400; dlg. URL = url; dlg. title = title; dlg. show () ;}</script>

Define an iframe to introduce the corresponding interface:
Copy codeThe Code is as follows: <iframe src = "default.htm" height = "600" width = "100%" frameborder = "0" id = "parentframe" name = "parentframe" marginheight = "0" marginwidth =" 0 "runat =" server "scrolling =" auto "> </iframe>
In the pop-up window that needs to be called, you can write as follows:

Function B (URL, title, id) {set_current (id); top. openDialog (title, URL); // The js method in index.htm is used here}

In other subpages, a prompt box is displayed:

Top. dialog. alert ("prompt successful"); // only top is prompted. dialog. close (); // close the window top. dialog. alert ("prompt successful", function () {top. dialog. close () ;}) // a prompt is displayed. Click OK to close the pop-up window.

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.