I want to open new window with no address bar

雨燕双飞 提交于 2021-02-11 17:41:01

问题


var myWindow = window.open("","myWindow","ttilebar=no,location=no,status=no,menubar=no,width=306,height=325,margin-top:0px,margin-left=0px,left="+left+"px, top="+top+"px,toolbar=no, scrollbars=no, resizable=no");
    myWindow.document.write('<iframe style="width:306px;height:342px;" id="CCBox"'
            + 'class="ifti1" src="http://localhost:8089/clientChatbox?user='
            + encodeURI(JSON.stringify(user))
            + '"frameborder="0" '
            + '></iframe>');

I want to open it in with no title and no address bar.


回答1:


Because of security issue, this may not be possible now in all modern browsers. Look at below urls for more details:

Hiding address bar in all browsers

Open new popup window without address bars in firefox & IE




回答2:


Courtesy: Comment from Stackoverflow

It's different in every browser.

Some years ago, what you tried, was right. But nowadays it is regarded as a security risk that one cannot see the browsers address bar and (for phishing reasons) and so they (or most of them) made the decision to always show the browser address bar.



来源:https://stackoverflow.com/questions/31113809/i-want-to-open-new-window-with-no-address-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!