Home > Web Front-end > JS Tutorial > Sharing examples of js implementation of pop-up windows, pages turning gray and inoperable_javascript skills

Sharing examples of js implementation of pop-up windows, pages turning gray and inoperable_javascript skills

WBOY
Release: 2016-05-16 16:48:57
Original
1307 people have browsed it

If you still don't know how, you can take a look at the simple example below.

Copy code The code is as follows:



After a window pops up, the following layers are inoperable
<script><br>function show() //Show hidden layers and pop-up layers<br>{<br> var hideobj=document.getElementById("hidebg");<br> hidebg.style.display="block"; //Show hidden layer<br> hidebg.style.height=document.body.clientHeight "px"; // Set the height of the hidden layer to the height of the current page <br> document.getElementById("hidebox").style.display="block"; //Show the pop-up layer<br>}<br>function hide() //Remove the hidden layer and popup layer <br>{<br> document.getElementById("hidebg").style.display="none";<br> document.getElementById("hidebox").style.display="none";<br> }<br></script>



Click to close< ;/div>
Click to try



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template