It's not who you are underneath, it's what you do that defines you

如何用JS打开新窗口,并关闭原来窗口

 做一个触摸屏查询系统,要打开新页面后关闭父界面 百度之

function openNewWindow() { window.open("Index.aspx", "", "left=30,top=30,toolbar=no,menubar=no,scrollbars=no,resizable=no,status=no,location=no,directories=no,copyhistory=no,height=620,width=820"); window.opener =null; window.open("", "_self"); window.close(); }

 

这样写的话,由于窗口拦截的原因,会使新窗口打不开,而且原来的窗口也被关闭了

 

于是再查询找到解决去方法

在新页面中

 onload="window.opener。opener=null; window.opener.close();"

posted @ 2012-06-14 23:03  金铭杰  阅读(7327)  评论(1编辑  收藏  举报

Brick walls are there for a reason :they let us prove how badly we want things