JavaScript-like Windows Shutdown effect-Javascript tutorial

Source: Internet
Author: User
JavaScript: similar Windows Shutdown effect, JavaScript tutorial

Basic Principle Analysis

Windows Shutdown Result Analysis
When a user in Windows shuts down, the displayed interface only allows the user to choose to shut down, unregister or cancel the action, and the programs on the desktop cannot be used, and the screen is dimmed.

In this example, the effect of the highlighted display is achieved on the webpage.

What are the benefits of using this shutdown function on the webpage? First, you can click a link to hide unavailable operations in the background, place available operations at the top of the screen, and highlight them to avoid misoperation. Second, highlight the information and remind users of the precautions.
Analysis of shutdown results on the webpage
The principle of implementing this effect on Web pages is simple. Create two layers. One is the covering layer, which overwrites the entire page and is displayed in gray. The other layer is used as the highlighted part above the covering layer, this can be set by setting the z-index attribute of the layer. After the shutdown is canceled, delete the two layers on the page.
Run the following code to display the shutdown effect.


Ajax LightBox Sample









Note that in IE browserThe flag cannot be overwritten, but can be overwritten in other browsers.When using the IE browserHide the element. Use the following code to hide allElement.Selects = document. getElementsByTagName ('select ');For (I = 0; I <selects. length; I ++ ){Selects [I]. style. visibility = visibility;}[1] [2] [3] Next page

Related Article

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.