伙计们,我在 c# 中使用 imagemap,我在代码中导航到图像映射。我希望新页面作为弹出窗口出现,我已经成功了。但是在 mozilla 中,我的父页面将 url 更改为:
"javascript:window.open('WebForm1.aspx','Graph','height=600,width=900');"
它在 chrome 中运行良好
我的绑定(bind)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'););";
关于c# - Window.open 将父页面导航到代码行 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19021193/