将新页面带到前面

时间:2014-07-25 03:20:06

标签: javascript asp.net vb.net

我试图在vb asp.net中使用window.open打开新页面。

问题是新页面没有显示在前面。 如何让新页面显示在当前页面前?

  Protected Sub btnedit_Click(sender As Object, e As EventArgs) Handles btnedit.Click
 ScriptManager.RegisterStartupScript(Me, GetType(String), "OPEN_WINDOW",
"var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(700/2); 
var newwin=window.open( '" & ResolveUrl("~/webform/Multimedia/Videos/playlistadd.aspx?
mediaID=" & gvlist.Tag(gvlist.SelectedIndex) & "") & "', null,
'height=600,width=750,status=yes,toolbar=no,
scrollbars=yes,menubar=no,location=no,resizable=no,top='+Mtop+', left='+Mleft+'' );
newwin.focus();", True)

End Sub

消除混乱

var newwin=window.open( '/webform/Multimedia/Videos/playlistadd.aspx?mediaID=myvalue', null,'height=600,width=750,
status=yes,toolbar=no,scrollbars=yes,
menubar=no,location=no,resizable=no,
top='+Mtop+', left='+Mleft+'' );
newwin.focus();

1 个答案:

答案 0 :(得分:0)

使用BringToFront方法强制它显示在前面。

相关问题