"Warm know new" JavaScript window effect (full screen window, timed close window)

Source: Internet
Author: User

1. Full Screen display window

<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>Full Screen display window</title></Head><Body><DivAlign= "Center"><inputtype= "button"name= "fullscreen"value= "Full screen display"onclick= "window.open (document.location, ' big ', ' Fullscreen=yes ')"  /></Div></Body></HTML>

2. Close the window regularly

<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>Close the window regularly</title><Scripttype= "Application/javascript">varI=6; clock ();functionclock () {Document.title= "This window will be"+I+"seconds after the auto-off! "; I--; if(i>0) SetTimeout ("clock ()", +); Else     {         //1. Enter About:config in the Firefox address bar    //2. Locate the dom.allow_scripts_to_close_windows in the configuration list    //3. Right click on the switch to change the above false to true.     //Note: The default is False, in order to prevent the script from disorderly closing the window    //When you do this in Firefox, you can close the window by using "Window.close ()" directly.         //window.open (', ' _self ', '); Add this code for Chrome, but I'm not testing it, but I'm still warning: Scripts may close just the windows that were opened by it . Window.close (); }}</Script></Head><Body></Body></HTML>

Source: HTML, CSS, JavaScript Web authoring from beginner to proficient 15.3 chapters

Effective under Ps:ie

"Warm know new" JavaScript window effect (full screen window, timed close window)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.