網絡應用程序,其中我使用一些彈出窗口來打開一些頁面。對於這一點,我使用的方法是這樣彈出窗口中隱藏地址欄
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();
}
現在,它正與顯示在地址欄的罰款。但我的要求是我必須在我的所有彈出窗口中隱藏地址欄。這可能嗎?請通過提供一種解決方感謝davance ..
沒有單一的解決方案,將與所有瀏覽器 – stillstanding 2010-11-22 07:54:29
工作,但我需要的在ie中工作的解決方案。 – MAC 2010-11-22 07:57:15