Home >Web Front-end >HTML Tutorial >How to enter a URL in the address bar and a fixed window will pop up_html/css_WEB-ITnose

How to enter a URL in the address bar and a fixed window will pop up_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:24:461723browse

html

How to enter a URL in the address bar and a fixed window will pop up, just like the open window in html, or the window.showModelessDialog written in js.

Reply to the discussion (solution)

This can’t be achieved, right?

Is this what you mean?
javascript:window.open("http://www.baidu.com/","_blank","width=400, height=400");
Opera and Firefox can do it, but IE9 and Chrome can't .
Opera and Firefox cannot do this if the current page is a blank page.
If you make that thing a bookmark, it seems that all browsers will be able to do it, but it still doesn’t seem to work if the current page is a blank page. How to make it a bookmark? Please refer to this: http://tieba.baidu.com/tb/picture/shenqi.html
That thing is called javascript pseudo-protocol.


That is to say, after entering the address in the address bar, a webpage will open, but this webpage is a webpage dialog box.

LZ can write when the page is loading:

$(document).ready(function() {    window.open("http://cn.bing.com", null, "location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0");    window.close();});

But
1. First, the browser must be set to enable pop-up windows.
2. IE8 can set the status bar to be displayed and hidden. I am not sure whether it is above or below IE8. The CHROME setting has no effect
3. When window.close(), IE8 will pop up a prompt box


Reply to: 2013-09-29 09:06:54

LZ can write when the page is loading:



JavaScript code
?


1234

$(document).ready(function() { window.open("http://cn.bing.com", null, "location=0,menubar=0, resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0"); window.close();});

But
1. First, the browser must be set to enable scrolling window.
2. IE8 can set the status bar to be displayed and hidden. I am not sure whether it is above or below IE8. The CHROME setting has no effect
3. When window.close(), IE8 will pop up a prompt box



But when I open the page in the tomcat server, there is still an address bar, which can be hidden when placed outside the server




LZ You can write when the page is loading:

$(document).ready(function() {    window.open("http://cn.bing.com", null, "location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0");    window.close();});

But
1. First, the browser must be set to enable pop-up windows.
2. IE8 can set the status bar to be displayed and hidden. I am not sure whether it is above or below IE8. The CHROME setting has no effect
3. When window.close(), IE8 will pop up a prompt box



But when I open the page in the tomcat server, there is still an address bar. It can be hidden when placed outside the server

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn