How can I hide the address bar in a modal dialog?

前端 未结 4 1272
夕颜
夕颜 2020-12-22 04:57

How can I hide the address bar (location bar ) in a modal dialog? Here is my code:

var dialogFeatures = \'center:yes; dialogWidth:600px; location:no;dialogHe         


        
相关标签:
4条回答
  • 2020-12-22 05:31

    You can't.

    Hiding the address bar is disallowed in most browsers, for security reasons.

    0 讨论(0)
  • 2020-12-22 05:34

    You can't hide the address bar, location: no is not a valid option for the features argument.

    In Internet Explorer 7 and later, all windows opened by the browser have an address bar. The same is true of Google Chrome and other browsers supporting showModalDialog.

    0 讨论(0)
  • 2020-12-22 05:42

    It's not possible. The address bar is a security feature in most browsers, in IE since version 7, in Firefox (I think) since version 2.

    0 讨论(0)
  • 2020-12-22 05:53

    in about:config change this parameter:

    dom.disable_window_open_feature.location
    and for menubar and any other components you have to change their feature in about:config

    0 讨论(0)
提交回复
热议问题