<script type = "text/javascript">
função Toggle () {) {
theObj = document.getElementById ('sunyanzi').
If (theObj.display == "nenhum") theObj.display = "bloco";
}
</script>
<div id = "sunyanzi" style = "display: nenhum"> você me vê aparecendo ~~~ </div>
<br />
<input type = "Button" onclight = "Toggle ()" Value = "Tente ver ...?"
Dois métodos: remova e oculta
// Crie sua camada pop -up
var dvmsg = document.createElement ("div");
strhtml = "<div class = '####'> Pop -Up Layer Content </div>" "
Strhtml += "<div class = '####'> <input type = 'button' value = 'desligam' onclick = 'btnClick ()'> </div>"
dvmsg.innerhtml = strhtml;
document.body.appendChild (DVMSG);
// feche o botão
btncClick = function () {{
document.body.removeChild (DVMSG);
-----------------------------
Ou a camada pop -up está marcada com um Div ID
<div id = "Tanchu"> Conteúdo da camada pop -up </div>
em JS
função aberta () {
document.getElementById (Tanchu) .style.display = "" "; // Display
}
Function close () {) {
Document.getElementById (Tanchu) .style.display = "None";
}