"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="stylesheet" type="text/css" />
<script type="text/javascript" src="artDialog.js"></script>
<script type="text/javascript" src="plugins/iframeTools.js"></script> <!-- 對(duì)iframe的新工具 -->
</head>
<body >
<script type="text/javascript">
function a(){
art.dialog({content:’hello world!歷史’})
}
function b(){
art.dialog(
{
content:’歡迎你來到對(duì)話框世界!’,
lock:true,
style:’succeed noClose’
},
function(){
alert(’你點(diǎn)了確定’); //不管點(diǎn)了確定還是取消默認(rèn)都會(huì)關(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:’動(dòng)畫’,
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;//這樣對(duì)話框才不會(huì)關(guān)閉
},
function(){alert(’你是壞人’);}//按右上角的叉關(guān)閉對(duì)話框也會(huì)執(zhí)行這個(gè)函數(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)打開了對(duì)話框,按這個(gè)按鈕還能把它關(guān)閉
art.dialog({id:’menu_4834783’}).close();
_this.innerHTML = ’彈出菜單’; //button上顯示的內(nèi)容
return;
};
art.dialog({id:’menu_4834783’, title:’菜單’, content:’請(qǐng)輸入:<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="最簡(jiǎn)單的對(duì)話框"/><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>