First, click full screen on a common web page that has been opened, and enter the full screen mode corresponding to the web page. Method: add the following code between the & lt; body & gt; and & lt;/body & gt; of the webpage: & lt; form & gt; & lt; inputtype & quot; BUTTON & quot; name & quot; FullScreen & quot; value & qu
First:
On a common web page that has been opened, click "full screen" and enter the full screen mode corresponding to the web page. Method:AndAdd the following code:
If the full screen is not displayed on this page, you only need to replace document. location with the corresponding URL, that is, the following code:
Second:
When running a webpage, for example, you enter http: // localhost: 8080/temp in the URL bar. jsp: Close the web page and display a blank full-screen web page by writing the following code in the body:
Third:
In fact, it is the superposition of the above two types. Generally, this situation is also used more. When a webpage is opened directly, it enters the full screen mode. This is different from the first one, because after you click the "full screen display" button, it is a new full-screen web page, but the original normal Web page still exists, so this is better. Method: create two jsp files. The first one only runs the following code, for example, the name is demo. jsp; the second is the content you actually want to run, such as: temp. jsp:
Demo. jsp:
Temp. jsp:
<% @ Page contentType = "text/html; charset = GB2312" language = "java" %>
Here is my full screen content. Let's take a look at the demo. jsp we entered in the address bar. Is it disabled? OK!
Exit full screen
Certificate --------------------------------------------------------------------------------------------------------------------------------------------------------------------
I also searched a lot of information on the Internet to exit full screen. In general, it is difficult to achieve our desired goal. For example, we can add a hyperlink to open it in a new window; you can also apply the inverse method of the above method to enable full screen. However, no matter how it works, when switching from full screen to normal mode, it is always equivalent to re-opening a window. In this way, adding our original full screen mode is playing a movie, if you switch to normal mode, you have to reload it. However, there is no way. Now I will refer to the reply on the 5th floor in this post: Success. The Code is as follows:
<% @ Page contentType = "text/html; charset = GB2312" language = "java" %>
Var o = 1;
Function goResize ()
{
Var d = document. body, e = event, m = event. srcElement; o?
New function () {moveBy (e. clientX-e.screenX, e. clientY-e. screenY); resizeBy (screen. availWidth-d.offsetWidth, screen. availHeight-d. offsetHeight); m. value = "cancel"; o = 0 }:
New function () {moveTo (0, 0); resizeTo (screen. availWidth, screen. availHeight); m. value = "full screen"; o = 1}
}
Script
Close page
Certificate --------------------------------------------------------------------------------------------------------------------------------------------------------------------
To close the page, you only need to add such a hyperlink to the page:
Close Window
Author: "yanghuidang"