1銆乼est.html 嫻嬭瘯欏?/strong>
<html>
<head>
<title>嫻嬭瘯欏甸潰</title>
<script>
/**** 鎵撳紑娑堟伅妗?***
* @param 涓篛bject綾誨瀷,鍘熷瀷涓?{msg:"val1", time:val2},val1涓鴻鎻愮ず鐨勬秷鎭紝val2涓虹獥鍙e嚭鏉ュ悗寤惰繜鍏抽棴鐨勬椂闂?
*
*/
function showMsg(param) {
window.showModalDialog("msg.html", param, "dialogWidth:280px;dialogHeight:180px;center:yes;help:no;scroll:no;status:no;resizable:no");
}
/****鎿嶄綔紜紿楀彛*****
* @param 涓簊tring綾誨瀷,鎻愮ず淇℃伅
* @return true涓洪夊彇浜?#8220;紜畾”閾甸挳錛宖alse涓洪夊彇浜?#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("紜畾鍒犻櫎姝ょ敤鎴峰悧錛?);
if(rval) {
showMsg({msg:"浣犵偣鍑諱簡紜畾閾甸挳", time:1200});
}else{
showMsg({msg:"浣犵偣鍑諱簡鍙栨秷閾甸挳", time:1200});
}
}
</script>
</head>
<body>
<center>
<a href="#" onclick="showMsg({msg:'1縐掗挓鍚庝細鑷姩鍏抽棴鐨勬彁紺轟俊鎭', time:1000})">浼氳嚜鍔ㄥ叧闂殑鎻愮ず淇℃伅妗?lt;/a>
<br/>
<a href="#" onclick="confirmDel();">鎿嶄綔紜瀵硅瘽妗?lt;/a>
</center>
</body>
</html>