在如下代码中,设置的弹出窗口(有参数传递)如何居中

来源:百度知道 编辑:UC知道 时间:2024/07/07 12:33:13
<a style="CURSOR: hand" onclick='window.open("ViewContent.asp?ID=<%=rs("ArticleID")%>","","width=600,height=500,top=0,left=0,scrollbars=yes")'><%=rs("ArticleID")%></a>

<a style="CURSOR: hand" onclick='window.open("ViewContent.asp?ID=<%=rs("ArticleID")%>","","width=600,height=500,top=0,left=0,scrollbars=yes")'><%=rs("ArticleID")%></a>

top=0,left=0是设置显示位置的,现在是在左上角

http://tag.csdn.net/Article/7f235415-a040-421e-a6f0-8952adf86433.html

<a style="CURSOR: hand" onclick='window.open("ViewContent.asp?ID=<%=rs("ArticleID")%>","","width=600,height=500,scrollbars=yes,top="+(screen.availHeight-500)/2+",left="+(screen.availWidth-600)/2);'><%=rs("ArticleID")%></a>