您的位置:首页 > 编程语言 > ASP

ASP.NET弹窗+跳转链接写法+常用邮箱跳转判断方法

2016-12-21 18:01 399 查看
string email = Session[“email”].ToString();

switch (email)

{

case ("126.com"):
{
Response.Redirect("http://mail.126.com/");
break;
}
case ("163.com"):
{
Response.Redirect("http://mail.163.com/");
break;
}

case ("sina.com"):
{
Response.Redirect("http://mail.sina.com.cn/");
break;
}
case ("21cn.com"):
{
Response.Redirect("http://mail.21cn.com/w2/");
break;
}

case ("sohu.com"):
{
Response.Redirect("http://mail.sohu.com/fe/#/login");
break;
}
case ("yahoo.com"):
{
Response.Redirect("https://login.yahoo.com/config/mail?&.src=ym&.intl=cn");
break;
}
case ("tom.com"):
{
Response.Redirect("http://web.mail.tom.com/webmail/login/index.action");
break;
}

case ("qq.com"):
{
Response.Redirect("https://mail.qq.com/");
break;
}
case ("eyou.com"):
{
Response.Redirect("http://www.eyou.com/");
break;
}

case ("56.com"):
{
Response.Redirect("http://www.56.com/home.html");
break;
}
}


先附上手打的邮箱跳转源码,特别是邮件找回密码的时候很有用

Response.Write(“< script>alert(‘链接已过期’);location=’Eror.aspx’< /script>”);

在开发网站的时候,要有些链接设置超时等,可以链接到一个空的链接去,即可以使用上面那行代码
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息