1、test.html 试?/strong>
<html>
<head>
<title>试面</title>
<script>
/**** 打开消息?***
* @param 为Objectcd,原型?{msg:"val1", time:val2},val1提示的消息,val2为窗口出来后延迟关闭的时?
*
*/
function showMsg(param) {
window.showModalDialog("msg.html", param, "dialogWidth:280px;dialogHeight:180px;center:yes;help:no;scroll:no;status:no;resizable:no");
}
/****操作认H口*****
* @param 为stringcd,提示信息
* @return true为选取?#8220;定”铵钮Qfalse为选取?#8220;取消”铵钮
*/
function confirm(msg) {
return window.showModalDialog("confirm.html", msg, "dialogWidth:280px;dialogHeight:180px;center:yes;help:no;scroll:no;status:no;resizable:no");
}
function confirmDel() {
var rval = confirm("定删除此用户吗Q?);
if(rval) {
showMsg({msg:"你点M(jin)定铵钮", time:1200});
}else{
showMsg({msg:"你点M(jin)取消铵钮", time:1200});
}
}
</script>
</head>
<body>
<center>
<a href="#" onclick="showMsg({msg:'1U钟后会(x)自动关闭的提CZ息框', time:1000})">?x)自动关闭的提示信息?lt;/a>
<br/>
<a href="#" onclick="confirmDel();">操作认对话?lt;/a>
</center>
</body>
</html>