<script>
win=window.open("about:blank");function CloseWin()
{
if(!win.closed) win.close();else alert('已经关闭了');
}
</script>
<a href='#' onclick='CloseWin()'>关闭</a>
win=window.open("about:blank");function CloseWin()
{
if(!win.closed) win.close();else alert('已经关闭了');
}
</script>
<a href='#' onclick='CloseWin()'>关闭</a>
解决方案 »
- 请问一个easyui中tabs关闭提示问题
- 求人帮写个正则表达式
- js 兼容性 window.parent.frames["myFrameFile"] 请教高手
- JS实现简单拖拽
- 求救 ,一个JS问题烦了我几天了,大侠们在哪呀
- 怎么样生成一个随机的颜色值?
- 关于区别鼠标调整左右上下表格宽度的问题(很难)
- JQuery 与EXTJs的抉择
- 有个关于在ios上微信播放视频全屏的问题,有什么好办法吗
- DataTable 问题求教
- 怎么写一正则表达式验证由汉字编码成的UTF8字符
- iframe引用的页内window.onload事件处理中取window.documentElement.clientHeight值的诡异现象!
<script type="text/javascript">
var winHadle;
function openWindow()
{
winHadle=window.open("b.htm");
}
function closeWindow()
{
winHadle.close();
} </script>
<body>
<input type="button" onclick="openWindow()" value="open">
<input type="button" onclick="closeWindow()" value="close">
</body>
</html>
function fullwindow(){
window.open(document.frame1.document.location, 'bigs', 'fullscreen=yes');
// document.frame1.document.ondblclick=document.frame1.window.close(); 这句不行
}
<input type="button" onclick="fullwindow()" value="fullscreen"> 因小弟打开的是一个全屏窗口,所以再回去操作原来的那个窗口就不是很方便了,小弟想通过 双击 或者 esc 关闭打开的全屏窗口(在fullwindow中实现),不知各位大哥有没有办法。
<script type="text/javascript">
function openWindow()
{
var a=window.open(window.location);
}
</script>
<body ondblclick="if(opener){window.close()}">
<input type="button" onclick="openWindow()" value="Open Window">
</body>
</html>
function fullwindow()
{
var win= window.open("about:blank", 'bigs', 'fullscreen=yes');
win.document.ondblclick=function(){win.close();}
win.document.onkeydown=function(e){e=e||win.event;if(e.keyCode==27)win.close();}
}
</script> <input type="button" onclick="fullwindow()" value="fullscreen">
<script type="text/javascript">
var winHadle;
function openWindow()
{
winHadle=window.open("b.htm");
}
function closeWindow()
{
if(winHadle)
winHadle.close();
} </script>
<body>
<input type="button" onclick="openWindow()" value="open">
<input type="button" ondblclick="closeWindow()" value="close">
</body>
</html>