其实使用一个非模式对话框模拟出alert对话框的效果,代码如下——
<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);
}
</script>
<iframe
style="display:none" name=if0
></iframe>
<input
type="button" value="弹出alert框,一秒后自动关闭;"
onClick="JavaScript:test()">
</form>