This article describes the simple usage of JS pop-up plug-in zDialog. Share it for your reference, as follows:
Because there are no elements that can be displayed on the Frameset, it is redefined, an index.htm, and its operation is:
Index.htm
<script language="javascript" src="JS/zDialog/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">//In its child page, call this method to openDialog(title,url){var dlg=new Dialog();//Define Dialog object dlg.Model=true;dlg.Width=500;//Define length dlg.Height=400;dlg.URL=url;dlg.Title=title;dlg.show();}</script>Define an iframe to introduce the corresponding interface:
The code copy is as follows:<iframe src="default.htm" frameborder="0" id="parentframe" name="parentframe" marginheight="0" marginwidth="0" runat="server" scrolling="auto"></iframe>
In the interface where it needs to call the pop-up window, you can write it like this:
function b(URL, title,id){set_current(id);top.openDialog(title,URL);//The js method in index.htm is called here}In other subpages, a prompt box pops up:
top.Dialog.alert("Successful");//Only prompt top.Dialog.close();//Close the window top.Dialog.alert("Successful", function(){top.Dialog.close();})//Popular prompt, click OK to close the pop-up window after clicking OKFor more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging techniques", "Summary of JavaScript data structures and algorithm skills", "Summary of JavaScript traversal algorithms and techniques", and "Summary of JavaScript mathematical operations usage"
I hope this article will be helpful to everyone's JavaScript programming.