net 应用程序,我在其中使用一些弹出窗口来打开一些页面。为此,我正在使用这样的方法
private void OpenWindow(string Url, string height, string Width)
{
try
{
string strScript = "";
strScript += "<script language=\"javascript\">";
strScript += "eval(\"popUpWindow('" + Url + "',0,0," + Width + "," + height + ",directories=no)\");";
strScript += "</script>";
lblScript.Text = strScript;
}
catch (Exception ex)
{
LogError.Log(ex);
throw;
}
}
JavaScript 函数如下:
var popUpWin = 0;
function popUpWindow(URLStr, left, top, width, height, windowName) {
left = (screen.width / 2) - width / 2;
top = (screen.height / 2) - height / 2;
if (popUpWin) {
if (!popUpWin.closed)
popUpWin.close();
}
popUpWin = open(URLStr, windowName, 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width=' + width + ',height=' + height + ',left=' + left + ', top=' + top + ',screenX=' + left + ',screenY=' + top + '');
popUpWin.focus();
}
现在它与显示地址栏一样好。但我的要求是我必须在所有弹出窗口中隐藏地址栏。这可能吗?请提供一种解决方案来提供帮助。非常感谢..