pupup 화면이 나오면 부모 화면을 잠그세요.
1313 단어 html
common.js
/**
*
*/
function lockParentWindow(){
var win = window.opener;
if (win) {
if (win.document.getElementById("mask")){
win.document.getElementById("mask").style.display = "";
}
}
}
/**
*
*/
function unlockParentWindow(){
var win = window.opener;
if (win){
if (win.document.getElementById("mask")){
win.document.getElementById("mask").style.display = "none";
}
}
}
html , ,
<div id="mask" style="position:absolute;z-index:100;width:100%;height:100%;background-color:black;filter:alpha(opacity=25);-moz-opacity:0.25;opacity:0.25;display:none;">
<iframe src="javascript:false" style="position:absolute;width:100%;height:100%;background-color:black;filter:alpha(opacity=0);-moz-opacity:0.0;opacity:0.0;"></iframe>
</div>
load,unload
<script type="text/javascript">
window.onload = function(){
lockParentWindow();
}
window.onunload = function(){
unlockParentWindow();
}
</script>