<script language="JavaScript">
var aaa
function test()
{
aaa=if0.showModelessDialog("javascript:alert();window.close();","","status:no;resizable:no;help:no;dialogHeight:30px;dialogWidth:40px;");
setTimeout("if0.location.reload();",1000);
*/
function myConfirm(strTitle,strMessage,intType,intWidth,intHeight)
{
var strDialogFeatures = "status=no;center=yes;help=no;dialogWidth="+intWidth+";dialogHeight="+intHeight+";scroll=yes;resize=no";
var args = new Array();
args[args.length] = strTitle;
args[args.length] = strMessage;
args[args.length] = intType;
var result = showModalDialog("myConfirm.htm",args,strDialogFeatures);
return result;
}
function test()
{
var myConfirmResult = myConfirm("这里是标题","aaa",2,12,7)
}
</script>
</head>
<body>
<input type="button" value="点我试试" onclick="test()">
<br>
<br>
</html>
myConfirm.htm
========================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
<!--
var args = window.dialogArguments
try{
document.title = args[0]; //设置标题
}catch(e)
{
//这里屏蔽了错误,防止万一调用的传递参数不足
}