Home Web Front-end JS Tutorial Detailed explanation of the use and closing of jQuery plug-in artDialog.js

Detailed explanation of the use and closing of jQuery plug-in artDialog.js

Dec 27, 2017 am 09:16 AM
javascript jquery

This article mainly introduces the use and closing methods of jQuery plug-in artDialog.js, and analyzes the simple use method and related precautions of jQuery pop-up window plug-in artDialog.js based on specific examples. Friends who need it can refer to it. It will help after washing. to everyone.

Close the sub-window artdialog ultimate solution:


window.parent.window.art.dialog({ id: 'qin123' }).close();
Copy after login


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>art</title>
 <link id="artDialogSkin" href="skins/default.css" rel="external nofollow" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="artDialog.js"></script>
<script type="text/javascript" src="plugins/iframeTools.js"></script> <!-- 对iframe的新工具 -->
</head>
<body >
<script type="text/javascript">
 function a(){
    art.dialog({content:&#39;hello world!历史&#39;})
    }
 function b(){
  art.dialog(
  {
   content:&#39;欢迎你来到对话框世界!&#39;,
   lock:true,
   style:&#39;succeed noClose&#39;
  },
  function(){
   alert(&#39;你点了确定&#39;); //不管点了确定还是取消默认都会关闭artdialog,除非在这里面返回false
  },
  function(){
   alert(&#39;你点了取消&#39;);
  }
     );
    }
 function c(){
 art.dialog(
 {
 title:&#39;图片查看&#39;,
 fixed:true,
  content:&#39;<img width="817" height="479" src="butterfly.jpg" />&#39;
     });
 //return false;
 };
 function d(){
 // art.dialog({title:&#39;dialog内嵌iframe&#39;, iframe:&#39;http://www.baidu.com&#39;, width:&#39;900&#39;, height:&#39;500&#39;});
 //已经没有了直接的iframe属性 通过下面的方式内嵌iframe 第二种效果不佳
 art.dialog.open("http://www.baidu.com", {width: 320, height: 400});
 // art.dialog({title:&#39;dialog内嵌iframe&#39;, width:&#39;900px&#39;,height:&#39;500px&#39;, content:"<iframe align=&#39;right&#39; src=&#39;http://www.baidu.com&#39; width:&#39;100%&#39; height:&#39;100%&#39; />"});
 return false;
 };
 function e(){
 art.dialog(
 {
 title:&#39;动画&#39;,
 fixed:true,
  content:&#39;<embed src="ddd.rm" type="audio/x-pn-realaudio-plugin" autostart="true" width="420" height="363"></embed>&#39;
     });
 }; //播放avi总是只有声音,没有画面,哎!
function f(){
 art.dialog({content:&#39;你人品稳定么?&#39;, fixed:true, yesText:&#39;我很稳定&#39;, style:&#39;confirm&#39;, id:&#39;bnt4_test&#39;},
 function(){
   art.dialog({id:&#39;bnt4_test&#39;}).content(&#39;你骗人!&#39;);
   return false;//这样对话框才不会关闭
  },
  function(){alert(&#39;你是坏人&#39;);}//按右上角的叉关闭对话框也会执行这个函数
  );
 };
 function g(){
 art.dialog({mouse:true, id:&#39;dg_test34243&#39;, content:&#39;您收到 <strong>2</strong> 条消息&#39;,left:&#39;right&#39;,width:&#39;15em&#39;, top:&#39;bottom&#39;, fixed:true});
 };
 function h(){
 art.dialog({id:&#39;dg_test34243&#39;}).close();
 };
 function i(){
  var _this = document.getElementById(&#39;btn7&#39;);
  if (document.getElementById(&#39;menu_4834783&#39;)) {//如果已经打开了对话框,按这个按钮还能把它关闭
  art.dialog({id:&#39;menu_4834783&#39;}).close();
  _this.innerHTML = &#39;弹出菜单&#39;; //button上显示的内容
  return;
  };
 art.dialog({id:&#39;menu_4834783&#39;, title:&#39;菜单&#39;, content:&#39;请输入:<input style="width:200px;" id="M_dfd" type="text" value="hello world!" />&#39;,
  button:[{name:&#39;确定&#39;,callback:function(){
    var a=document.getElementById(&#39;M_dfd&#39;).value;
    art.dialog({content:a, lock:true, time:1});
    }
  },
  {name:&#39;关闭我&#39;,callback:function(){_this.innerHTML = &#39;弹出菜单&#39;;}}
  ]
  }
  );
 _this.innerHTML = &#39;关闭菜单&#39;;
 return false;
 };
 </script>
<input type="button" style="width: 100px" onClick="a()" value="最简单的对话框"/><br/>
<button id="btn0" onClick="b()">基本示例</button><br/>
<button id="btn1" onClick="c()">显示图片</button><br/>
<button id="btn2" onClick="d()">外部页面</button><br/>
<button id="btn3" onClick="e()">视频</button><br/>
<button id="btn4" onClick="f()">询问</button><br/>
<button id="btn5" onClick="g()">广告</button>
<button id="btn6" onClick="h()">关闭</button><br/>
<button id="btn7" onClick="i()">弹出菜单</button><br/>
</body>
</html>
Copy after login

Related recommendations:

How to understand the Jquery plug-in

Detailed explanation of how the jquery plug-in tablesorter implements html table usage examples

Introduction and creation of the jquery plug-in datatables attribute Detailed explanation of paging and sorting examples

The above is the detailed content of Detailed explanation of the use and closing of jQuery plug-in artDialog.js. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed explanation of jQuery reference methods: Quick start guide Detailed explanation of jQuery reference methods: Quick start guide Feb 27, 2024 pm 06:45 PM

Detailed explanation of jQuery reference method: Quick start guide jQuery is a popular JavaScript library that is widely used in website development. It simplifies JavaScript programming and provides developers with rich functions and features. This article will introduce jQuery's reference method in detail and provide specific code examples to help readers get started quickly. Introducing jQuery First, we need to introduce the jQuery library into the HTML file. It can be introduced through a CDN link or downloaded

How to use PUT request method in jQuery? How to use PUT request method in jQuery? Feb 28, 2024 pm 03:12 PM

How to use PUT request method in jQuery? In jQuery, the method of sending a PUT request is similar to sending other types of requests, but you need to pay attention to some details and parameter settings. PUT requests are typically used to update resources, such as updating data in a database or updating files on the server. The following is a specific code example using the PUT request method in jQuery. First, make sure you include the jQuery library file, then you can send a PUT request via: $.ajax({u

How to remove the height attribute of an element with jQuery? How to remove the height attribute of an element with jQuery? Feb 28, 2024 am 08:39 AM

How to remove the height attribute of an element with jQuery? In front-end development, we often encounter the need to manipulate the height attributes of elements. Sometimes, we may need to dynamically change the height of an element, and sometimes we need to remove the height attribute of an element. This article will introduce how to use jQuery to remove the height attribute of an element and provide specific code examples. Before using jQuery to operate the height attribute, we first need to understand the height attribute in CSS. The height attribute is used to set the height of an element

jQuery Tips: Quickly modify the text of all a tags on the page jQuery Tips: Quickly modify the text of all a tags on the page Feb 28, 2024 pm 09:06 PM

Title: jQuery Tips: Quickly modify the text of all a tags on the page In web development, we often need to modify and operate elements on the page. When using jQuery, sometimes you need to modify the text content of all a tags in the page at once, which can save time and energy. The following will introduce how to use jQuery to quickly modify the text of all a tags on the page, and give specific code examples. First, we need to introduce the jQuery library file and ensure that the following code is introduced into the page: &lt

Use jQuery to modify the text content of all a tags Use jQuery to modify the text content of all a tags Feb 28, 2024 pm 05:42 PM

Title: Use jQuery to modify the text content of all a tags. jQuery is a popular JavaScript library that is widely used to handle DOM operations. In web development, we often encounter the need to modify the text content of the link tag (a tag) on ​​the page. This article will explain how to use jQuery to achieve this goal, and provide specific code examples. First, we need to introduce the jQuery library into the page. Add the following code in the HTML file:

How to tell if a jQuery element has a specific attribute? How to tell if a jQuery element has a specific attribute? Feb 29, 2024 am 09:03 AM

How to tell if a jQuery element has a specific attribute? When using jQuery to operate DOM elements, you often encounter situations where you need to determine whether an element has a specific attribute. In this case, we can easily implement this function with the help of the methods provided by jQuery. The following will introduce two commonly used methods to determine whether a jQuery element has specific attributes, and attach specific code examples. Method 1: Use the attr() method and typeof operator // to determine whether the element has a specific attribute

Understand the role and application scenarios of eq in jQuery Understand the role and application scenarios of eq in jQuery Feb 28, 2024 pm 01:15 PM

jQuery is a popular JavaScript library that is widely used to handle DOM manipulation and event handling in web pages. In jQuery, the eq() method is used to select elements at a specified index position. The specific usage and application scenarios are as follows. In jQuery, the eq() method selects the element at a specified index position. Index positions start counting from 0, i.e. the index of the first element is 0, the index of the second element is 1, and so on. The syntax of the eq() method is as follows: $("s

Introduction to how to add new rows to a table using jQuery Introduction to how to add new rows to a table using jQuery Feb 29, 2024 am 08:12 AM

jQuery is a popular JavaScript library widely used in web development. During web development, it is often necessary to dynamically add new rows to tables through JavaScript. This article will introduce how to use jQuery to add new rows to a table, and provide specific code examples. First, we need to introduce the jQuery library into the HTML page. The jQuery library can be introduced in the tag through the following code:

See all articles