一下是我的代码
"<script>window.open('XX.aspx,'tree','width=300,height=470');</script>";请问怎样设置才能是XX.aspx可以居中?

解决方案 »

  1.   

    var win = window.open('XX.aspx,'tree','width=300,height=470');
    win.moveTo(x,y)由screen.x 和screen.y 算居中点
      

  2.   

    http://www.mikecat.net/blogview.asp?logID=1259&cateID=1
    NickLee.Framework.Web中有Function.js中有代码
      

  3.   

    var ret = showModalDialog(url,"","dialogHeight: " + height + "px; dialogWidth: " + width + "px; center: Yes; help: No; resizable: No; status: No; unadorned: No","");
    center:Yes
      

  4.   

    function WindowOpens(varurl,varwidth,varheight)
    {
       var vartop=(screen.height-varheight)/2;
       var varleft=(screen.width-varwidht)/2)   window.open(varurl,"openonices","top="+vartop+",left="+varleft+",width="+varwidth+",height="+varheight+");
    }