context.Response.Write("<script language='javascript'>");
context.Response.Write("window.open('http://localhost/WebUserAdmin/Login.aspx');");
context.Response.Write("window.opener = null;");
context.Response.Write("window.close();");
context.Response.Write("</script>");页面是弹出来了,但,当前页为什么没有关闭???错在哪里了!?
context.Response.Write("window.open('http://localhost/WebUserAdmin/Login.aspx');");
context.Response.Write("window.opener = null;");
context.Response.Write("window.close();");
context.Response.Write("</script>");页面是弹出来了,但,当前页为什么没有关闭???错在哪里了!?
function Close()
{
var ua=navigator.userAgent
var ie=navigator.appName=="Microsoft Internet Explorer"?true:false
if(ie)
{
var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE "))))
if(IEversion< 5.5)
{
var str = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'
str += '<param name="Command" value="Close"></object>';
document.body.insertAdjacentHTML("beforeEnd", str);
document.all.noTipClose.Click();
}
else
{
window.opener =null;
window.close();
}
}
else
{
window.close()
}
}
win.close();
用window.close()就可以直接关闭,
没有提示框。你可试试用window.open()打开A页面,然后再弹B页面
window.open('b.html');
window.close();
}这个可以关掉啊,但是关掉的时候有个提示出来
function OpenWindows()
{
window.open("webmain.aspx","onpenise");
window.openner=null;
window.close();
}
href="#">退出</A>