欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery插件artDialog.js使用與關(guān)閉方法示例

 更新時間:2017年10月09日 11:13:32   作者:IT小君  
這篇文章主要介紹了jQuery插件artDialog.js使用與關(guān)閉方法,結(jié)合具體實(shí)例形式分析了jQuery彈出窗口插件artDialog.js的簡單使用方法及相關(guān)注意事項(xiàng),需要的朋友可以參考下

本文實(shí)例講述了jQuery插件artDialog.js使用與關(guān)閉方法。分享給大家供大家參考,具體如下:

子窗口關(guān)閉artdialog終極解決方案:

window.parent.window.art.dialog({ id: 'qin123' }).close();
<!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:'hello world!歷史'})
    }
 function b(){
  art.dialog(
  {
   content:'歡迎你來到對話框世界!',
   lock:true,
   style:'succeed noClose'
  },
  function(){
   alert('你點(diǎn)了確定'); //不管點(diǎn)了確定還是取消默認(rèn)都會關(guān)閉artdialog,除非在這里面返回false
  },
  function(){
   alert('你點(diǎn)了取消');
  }
     );
    }
 function c(){
 art.dialog(
 {
 title:'圖片查看',
 fixed:true,
  content:'<img width="817" height="479" src="butterfly.jpg" />'
     });
 //return false;
 };
 function d(){
 // art.dialog({title:'dialog內(nèi)嵌iframe', iframe:'http://www.baidu.com', width:'900', height:'500'});
 //已經(jīng)沒有了直接的iframe屬性 通過下面的方式內(nèi)嵌iframe 第二種效果不佳
 art.dialog.open("http://www.baidu.com", {width: 320, height: 400});
 // art.dialog({title:'dialog內(nèi)嵌iframe', width:'900px',height:'500px', content:"<iframe align='right' src='http://www.baidu.com' width:'100%' height:'100%' />"});
 return false;
 };
 function e(){
 art.dialog(
 {
 title:'動畫',
 fixed:true,
  content:'<embed src="ddd.rm" type="audio/x-pn-realaudio-plugin" autostart="true" width="420" height="363"></embed>'
     });
 }; //播放avi總是只有聲音,沒有畫面,哎!
function f(){
 art.dialog({content:'你人品穩(wěn)定么?', fixed:true, yesText:'我很穩(wěn)定', style:'confirm', id:'bnt4_test'},
 function(){
   art.dialog({id:'bnt4_test'}).content('你騙人!');
   return false;//這樣對話框才不會關(guān)閉
  },
  function(){alert('你是壞人');}//按右上角的叉關(guān)閉對話框也會執(zhí)行這個函數(shù)
  );
 };
 function g(){
 art.dialog({mouse:true, id:'dg_test34243', content:'您收到 <strong>2</strong> 條消息',left:'right',width:'15em', top:'bottom', fixed:true});
 };
 function h(){
 art.dialog({id:'dg_test34243'}).close();
 };
 function i(){
  var _this = document.getElementById('btn7');
  if (document.getElementById('menu_4834783')) {//如果已經(jīng)打開了對話框,按這個按鈕還能把它關(guān)閉
  art.dialog({id:'menu_4834783'}).close();
  _this.innerHTML = '彈出菜單'; //button上顯示的內(nèi)容
  return;
  };
 art.dialog({id:'menu_4834783', title:'菜單', content:'請輸入:<input style="width:200px;" id="M_dfd" type="text" value="hello world!" />',
  button:[{name:'確定',callback:function(){
    var a=document.getElementById('M_dfd').value;
    art.dialog({content:a, lock:true, time:1});
    }
  },
  {name:'關(guān)閉我',callback:function(){_this.innerHTML = '彈出菜單';}}
  ]
  }
  );
 _this.innerHTML = '關(guān)閉菜單';
 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()">關(guān)閉</button><br/>
<button id="btn7" onClick="i()">彈出菜單</button><br/>
</body>
</html>

artDialog_v4.1.7點(diǎn)擊此處本站下載。

更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jQuery常用插件及用法總結(jié)》、《jquery中Ajax用法總結(jié)》、《jQuery表格(table)操作技巧匯總》、《jQuery擴(kuò)展技巧總結(jié)》、《jQuery常見經(jīng)典特效匯總》及《jquery選擇器用法總結(jié)

希望本文所述對大家jQuery程序設(shè)計有所幫助。

相關(guān)文章

最新評論