JS 判断 根据结果设定  window,open()  里的 width 和 height

解决方案 »

  1.   

    wa.htm<script>function url(s) 
    {  
    if(s=="111"){
    window.open('wb.htm','zyc','toolbar=no,scrollbars=yes,resizable=no,top=200,left=300,width=600,height=400');
    }if(s=="222")
    window.open('wb.htm','zyc','toolbar=no,scrollbars=yes,resizable=no,top=200,left=300,width=400,height=200');  

    </script> 
     <select name="ChangeStatus" style="float:right; margin-right:3px" onchange="url(this.value);"> 
             <option value='X'>xx</option> 
             <option value="111">111</option> 
             <option value="222"> 222 </option> 
    </select> 定义:wb.htm