Iframe로 모의 차단


<html>
<head>
<title>          </title>
</head>
<body style="margin: 0px;" >

<br>
<INPUT value=Text>
<SELECT style="WIDTH: 134px" name=""> <OPTION value=      
  selected>     </OPTION><OPTION value=     1>     1</OPTION></SELECT>
<button onclick="demo()">DialogClass</button> 
<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11v
<br>11<br>11<br>11<br>11<br>11<br>11<br>11
<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11
<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11v
<br>11<br>11<br>11<br>11<br>11<br>11<br>11
<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11<br>11

<script> 
var dialog = new DialogClass();   
function demo() 
{
  dialog.show(); 
  //          
  window.focus();
  //5     :dialog.close();  
  setTimeout("dialog.close()",5000);
} 

/** 
 *      : DialogClass 
 *     :         
 *     : CopyRight 2005-2006 JoeCom 
 *      : JoeCom | MSN:[email protected] |  blog:http://hi.baidu.com/joecom 
 *     : 2006-07-21 
 *      :  
 *     :  
 */ 

function DialogClass(){ 
    this.blankImgHandle = null; 
    this.tags = new Array("applet", "iframe", "select","object","embed"); 
    this.body_overflow_y = null; 
    this.body_overflow_x = null;   
 
   this.show = function() 
   {     
      this.body_overflow_y = document.body.style.overflowY; 
       this.body_overflow_x = document.body.style.overflowX; 
       document.body.style.overflowX = "hidden"; 
       document.body.style.overflowY = "hidden"; 
             
        var w = "100%" ; 
        var h = "100%" ; 
         
        this.blankImgHandle = document.createElement("iframe"); 
        with (this.blankImgHandle.style){ 
            position = "absolute"; 
            left     = 0; 
            top      = document.body.scrollTop; 
            height   = "100%"; 
            width    = "100%"; 
            zIndex   = "9999"; 
            filter   = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=10)"; 
            opacity  = "0.1";             
        }          
         
        document.body.appendChild(this.blankImgHandle);         
   }         
         
   this.close = function(){                
         document.body.style.overflowY = this.body_overflow_y;                
      document.body.style.overflowX = this.body_overflow_x; 
      if (this.blankImgHandle) 
      { 
          this.blankImgHandle.parentNode.removeChild(this.blankImgHandle); 
      }             
  } 
}
</script>
</body>
</html>

좋은 웹페이지 즐겨찾기