artDialog是一個精巧的web對話方塊元件,壓縮後只有十多KB,並且不依賴其他框架
下載
http://demo。jb51。net/js/2011/artDialog/_doc/down。html
artdialog。iframetools。js下載
http://www。bvbcode。com/cn/g6py04me-876136
引用
如果專案採用jQuery作為框架,則引用jQuery artDialog版本:
如果需要在iframe應用下提供 更好的支援,需要加上:
art。dialog({
title: ‘hello world!’
id : ‘warning’,
icon : ‘warning’,
lock : true,
fixed : true,
background : “#CCCCCC”,
opacity : 0。8,
content : ‘xiaoxin’,
yesText : ‘確定’,
yesfn: function () {
//reloadPage(window);
}
});
art。dialog({
icon: ‘succeed’,//alert、error、confirm
width: ‘20em’, height: 100,
id: ‘testID’,
content: ‘我支援HTML’ ,
title: ‘hello world!’,
button: [
{ name: ‘同意’,
callback: function () {
this。content(‘你同意了’)。time(2); return false;
},
focus: true
},
{ name: ‘不同意’,
callback: function () {
alert(‘你不同意’)
}
},
{ name: ‘無效按鈕’, disabled: true },
{ name: ‘關閉我’ }
],
});