Home >Web Front-end >JS Tutorial >Use js to close the window of the js pop-up layer_javascript skills
Two methods: remove and hide
//Create your pop-up layer
var dvMsg = document.createElement("div");
strHtml = "
or the popup layer is marked with div id
js
function open(){document.getElementById(tanchu).style.display=""; //Display
}
function close() {
document.getElementById(tanchu).style.display="none"; //Does not display (load again when the page is initialized)
}