window.open 一般在主页打开一个窗口,如果使用者不关闭弹出的窗口,再次点击还是会重复打开。
或者存在弹出窗口后,不会在最前端显示。下面是一个超链接弹出窗口的解决方案。
window.showModalDialog和window.showModelessDialog 除了IE支持外,其他浏览器都不支持。
<asp:HyperLink ID="test" ForeColor="#1E71B5" runat="server"
NavigateUrl="javascript: var win; var arg=document.getElementById('MainContent_dmc').value;
var argp=document.getElementById('MainContent_package_name').options[document.getElementById('MainContent_package_name').selectedIndex].value;
win=window.open('test.aspx?arg1='+arg+'&arg2='+argp,'web1','Height=500px,Width=300px,top=200, left=700');
if (win && win.open && !win.closed) win.focus();">
test</asp:HyperLink>