在服务端判断IE版本是6.0, 就用window.shoModalDialog()弹出一个类似登录的窗口 点了取消或确定,都打开默认的网站首页如果是ie6以下版本,则让用户下载IE6 这是net transport模拟ie6下来的html代码<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>Login</title> <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0"> <meta name="CODE_LANGUAGE" Content="C#"> <meta name="vs_defaultClientScript" content="JavaScript"> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <script language="javascript"> <!-- function startLogin(){ var current=window.top; if (current.opener!=null){ current.opener.location="Login.aspx"; current.close(); } else{ /*while (current.opener!=null){ var parentWindow=current.opener; current.close(); current=parentWindow.top; }*/ var nDialogWidth=422; var nDialogHeight=280; var nLeft=(window.screen.availWidth-nDialogWidth)/2; var nTop=(window.screen.availHeight-nDialogHeight)/2; window.moveTo(-9999,-9999);//窗口最小化 var sFeatures="dialogLeft:"+nLeft+"px;dialogTop:"+nTop+"px;dialogHeight:"+nDialogHeight+"px;dialogWidth:"+nDialogWidth+"px;help:no;status:no"; var bLogged=window.showModalDialog("AnonymousAccessibleForms/Login.htm",window,sFeatures);
点了取消或确定,都打开默认的网站首页如果是ie6以下版本,则让用户下载IE6
这是net transport模拟ie6下来的html代码<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Login</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
<!--
function startLogin(){
var current=window.top;
if (current.opener!=null){
current.opener.location="Login.aspx";
current.close();
}
else{
/*while (current.opener!=null){
var parentWindow=current.opener;
current.close();
current=parentWindow.top;
}*/
var nDialogWidth=422;
var nDialogHeight=280;
var nLeft=(window.screen.availWidth-nDialogWidth)/2;
var nTop=(window.screen.availHeight-nDialogHeight)/2;
window.moveTo(-9999,-9999);//窗口最小化
var sFeatures="dialogLeft:"+nLeft+"px;dialogTop:"+nTop+"px;dialogHeight:"+nDialogHeight+"px;dialogWidth:"+nDialogWidth+"px;help:no;status:no";
var bLogged=window.showModalDialog("AnonymousAccessibleForms/Login.htm",window,sFeatures);
if (bLogged){
window.moveTo(0,0);//窗口还原
window.top.location="Default.aspx";
}
else{
window.moveTo(0,0);
window.top.location="http://www.hexiesoft.com"
//HHCTRL.Click();//HTML HELP控件实现无提示关闭窗口*/
//window.close();
}
}
}
//-->
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Login" method="post" action="Login.aspx?ReturnUrl=%2fhexiesoft%2fDefault.aspx" id="Login">
<input type="hidden" name="__VIEWSTATE" value="dDwtMTI3OTMzNDM4NDs7PhK13K3iVM9krGdFJe5c/0ggoU6D" />
<script language=javascript>
startLogin();
;</script>
</form>
</body>
</HTML>