当前位置 : 主页 > 编程语言 > java >

根据输入邮箱号跳转到相应登录地址

来源:互联网 收集:自由互联 发布时间:2022-06-23
script var hash={ 'qq.com':'http://mail.qq.com', 'gmail.com': 'http://mail.google.com', 'sina.com': 'http://mail.sina.com.cn', '163.com': 'http://mail.163.com', '126.com': 'http://mail.126.com', 'yeah.net': 'http://www.yeah.net/', 'sohu.com
<script>
var hash={
'qq.com':'http://mail.qq.com',
'gmail.com': 'http://mail.google.com',
'sina.com': 'http://mail.sina.com.cn',
'163.com': 'http://mail.163.com',
'126.com': 'http://mail.126.com',
'yeah.net': 'http://www.yeah.net/',
'sohu.com': 'http://mail.sohu.com/',
'tom.com': 'http://mail.tom.com/',
'sogou.com': 'http://mail.sogou.com/',
'139.com': 'http://mail.10086.cn/',
'hotmail.com': 'http://www.hotmail.com',
'live.com': 'http://login.live.com/',
'live.cn': 'http://login.live.cn/',
'live.com.cn': 'http://login.live.com.cn',
'189.com': 'http://webmail16.189.cn/webmail/',
'yahoo.com.cn': 'http://mail.cn.yahoo.com/',
'yahoo.cn': 'http://mail.cn.yahoo.com/',
'eyou.com': 'http://www.eyou.com/',
'21cn.com': 'http://mail.21cn.com/',
'188.com': 'http://www.188.com/',
'foxmail.coom': 'http://www.foxmail.com'
};

$(function(){
$(".activateBoxl").each(function(){
var url = $(this).text().split('@')[1];

var sel_url_val ;//定义全局变量
$.each( hash, function(i, n){
if(i == url){
$(".activateBoxl").attr("href", n);//给跳转链接重新赋值
sel_url_val = 1 ;
}
});

if(sel_url_val != 1){
alert('输入邮箱号无法正确定位');
}

});
})
</script>

 

网友评论