a.htm代码:
<script language="javascript">
function winopen()
{
if(winopen.s==undefined || winopen.s.closed==true)
{
winopen.s = window.open("b.htm","","top=100,left=100,width=200,height=100");
}else{
winopen.s.focus();
}
}
</script>
<input name="open" type="reset" id="open" value="按钮" onclick="winopen();" />b.htm代码:
我是B.htm
<script language="javascript">
document.write(new Date());
</script>通过b.htm中显示的时间可检测窗口是新打开还是激活!
评论(0)
暂无评论。