<input type="button" value="打开按钮" onclick="Open()" />
<input type="button" value="关闭按钮" onclick="Close()" />
<input type="button" value="关闭间隔" onclick="Cg()" />
<input type="button" value="前进" onclick="Qian()" />
</body>
<script type="text/javascript">
function Qian()
{
//window.history.forward();
window.history.go(1);
}
function Hanshu()
{
window.location.href= "Untitled-1.html";
//alert(a);
//alert("你好");
}
var w;
function Open()
{
if(w==null)
{
w=window.open("digui.html","_self","width=500px height=500px");
}
}
function Close()
{
//window.close(); //当前窗口
w.close(); //关闭指定窗口
}
var id = window.setInterval("",2000);
function Show()
{
alert("这是间隔");
}
function Cg()
{
window.clearInterval(id);
}
//window.setTimeout("alert('这是延迟')",2000)
效果图