110,561
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<title>
标题
</title>
<script type="text/javascript">
function ShowWindow()
{
document.getElementById("divDialog").style.display = "";
setTimeout("CloseWindow()",5000);
}
function CloseWindow()
{
document.getElementById("divDialog").style.display = "none";
}
</script>
</head>
<body>
<!--
这个DIV就是弹出的窗口,按下面的参数设置修改一下就可以了
-->
<div id="divDialog" style="display:none;position:absolute;top:距窗口顶部的距离px;left:距窗口左边的距离px;background:url('图片地址');width:图片宽度px;height:图片高度px;">
填写内容:本页五秒后关闭...
</div>
<input type="button" value="单击我显对话框" onclick="ShowWindow();">
</body>
</html>
<html>
<head>
<title>
标题
</title>
<script type="text/javascript">
function CloseWindow()
{
window.close();
}
setTimeout("CloseWindow()",5000);
</script>
</head>
<body style="margin:0;padding:0;">
<div style="background:url('图片地址');width:图片宽度px;height:图片高度px;">
本页五秒后关闭
</div>
</body>
</html>
<script type="text/javascript">
function ShowWindow()
{
showModalDialog("sw.html", "", "dialogWidth:400px; dialogHeight:80px; status:0;help:0");
}
</script>
<input type="button" value="单击我显对话框" onclick="ShowWindow();">
<script type="text/javascript">
function CloseWindow()
{
window.close();
}
setTimeout("CloseWindow()",5000);
</script>
本页面五秒后关闭.