怎么让alert()对话框10秒钟后自动关闭!! 怎么让alert()对话框10秒钟后自动关闭!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我的意见:用框架实现,将alert()写到隐藏的子框架中,并定时刷新子框架,当然了alert()要事件来触发。 alert好像是不行,你可以改成页面然后写上下面的东西function ReAutoLoad(){ window.close();}setTimeout(ReAutoLoad,5000); 你可以用做个页面,页面就和alert一样子,然后来控制这个页面 alert好像是不行,只能模拟一个。试试这个<html><head><title>Test </title> <script> function test() { if0.showModelessDialog("javascript:alert();window.close();","","status:no;resizable:no;help:no;dialogHeight:30px;dialogWidth:40px;"); setTimeout("if0.location.reload();",10000); }</script></head> <body> <iframe style="display:none" name=if0 ></iframe> <input type="button" value="测试" onclick="test();"></body> </html> 用别的代替alert的对话框,那个是自动关闭不了的。 同上 10秒中自动关闭的就不是ALERT了... 你可以套个HTML页面 弹出alert框,一秒后自动关闭<br> <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> 浏览器访问servlet,出现空白,后台也没反应 jsp标签不支持嵌套? 权限控制 有关环境变量的问题 给Java Web版的朋友们散分~散分~ 简单的乱码问题 一个客户体验的问题 初学者问题,变量拷贝 如何读取属性文件,急 问一个request.sendRedirect问题 错误提示Generated servlet error:The constructor XMLOutputter(String, boolean, String) is undefined 求用javascript实现计数功能,并且不能刷新就能加1的?
window.close();
}setTimeout(ReAutoLoad,5000);
<html>
<head>
<title>Test </title>
<script>
function test() {
if0.showModelessDialog("javascript:alert();window.close();","","status:no;resizable:no;help:no;dialogHeight:30px;dialogWidth:40px;");
setTimeout("if0.location.reload();",10000);
}</script>
</head>
<body>
<iframe style="display:none" name=if0 ></iframe>
<input type="button" value="测试" onclick="test();">
</body>
</html>
<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>