代码:
document.write("宽度:"+window.innerWidth+",高度:"+window.innerHeight);
function btnClicked(){
window.open("obindex.html","windowname","height=200,width=200,top=20,left=100");
window.close();
}
代码:
var mytime=setInterval(function(){
getTime()
},1000);
function getTime(){
var d=new Date();
var t=d.toLocaleTimeString();
document.getElementById("ptime").innerHTML=t;
}
function stopTime(){
clearInterval(mytime);
}
var win;
function myWin(){
alert("hello")
win=setTimeout(function(){myWin()},3000);
}
function stopWin(){
clearTimeout(win);
}