Window.open 将父页面导航到代码行 URL

Window.open navigates parent page to codeline url

本文关键字:代码 URL 导航 open Window      更新时间:2023-09-26

伙计们,我在 c# 中使用图像映射,我在代码中为您提供导航到图像映射。我希望新页面以弹出窗口的形式出现,我已经成功了。但是在 Mozilla 中,我的父页面将 url 更改为:

"javascript:window.open('WebForm1.aspx','Graph','height=600,width=900');"

它在铬中工作正常

我用于将 url 绑定到热点的 c# 代码如下所示:

RectangleHotSpot rh;
CoordBAL _cbl = new CoordBAL(SessionContext.SystemUser);
rh = new RectangleHotSpot();
rh.Top =  0;
rh.Bottom =500 ;
rh.Left = 0 ;
rh.Right = 500 ;
rh.NavigateUrl = "javascript:window.open('default.aspx','Graph','height=600,width=900');";
ImgMp.HotSpots.Add(rh);

我得到了答案:

rh.NavigateUrl = "javascript:void(window.open('default.aspx','Graph','height=600,width=900'););";