ie6와 ie7에서의 팝업창 설정

By | 4월 10, 2009

[출처] ie6과 ie7에서의 팝업창 설정|작성자 테일

<script language="JavaScript">
function preview()
{
    // IE6, IE7 구분 ...
    var ie7_flag = false;
    ie7_flag = (window.navigator.userAgent.indexOf("MSIE 7") != -1); 

 
        if(ie7_flag)
        {
           if ( screen.width ) {
                 window.moveTo( (screen.width-410)/2, (screen.height-255)/2 );
                window.resizeTo( 410, 270);
        }        }
        else
        {
            if ( screen.width ) {
              window.moveTo( (screen.width-410)/2, (screen.height-255)/2 );
                window.resizeTo( 410, 255 );
      }        }
    }
</script> 

<table width="300" border="0">
  <tr>
    <td>
    <table id="previewTable" width="300" height="300">
      <tr>
        <td><img id="previewImage" border="0"></td>
      </tr>
    </table>
    <input type="file" onChange="preview()">
    </td>
    <td width="150"> </td>
  </tr>
</table> 

 

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments