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