admin管理员组

文章数量:1663657

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>js邮箱地址跳转</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
var hash={
'qq': 'http://mail.qq',
'gmail': 'http://mail.google',
'sina': 'http://mail.sina',
'163': 'http://mail.163',
'126': 'http://mail.126',
'yeah': 'http://www.yeah/',
'sohu': 'http://mail.sohu/',
'tom': 'http://mail.tom/',
'sogou': 'http://mail.sogou/',
'139': 'http://mail.10086/',
'hotmail': 'http://www.hotmail',
'live': 'http://login.live/',
'live': 'http://login.live/',
'live': 'http://login.live',
'189': 'http://webmail16.189/webmail/',
'yahoo': 'http://mail.yahoo/',
'yahoo': 'http://mail.yahoo/',
'eyou': 'http://www.eyou/',
'21cn': 'http://mail.21cn/',
'188': 'http://www.188/',
'foxmail.coom': 'http://www.foxmail'
};

$(function(){
$(".mail").each(function() {
var url = $(this).text().split('@')[1];
for (var j in hash){
$(this).attr("href", hash[url]);
}
});
})
</script>
</head>

<body>
<a href="#" target="_blank" class="mail">laike@qq</a> <br>
<a href="#" target="_blank" class="mail">laike@gmail</a> <br>
<a href="#" target="_blank" class="mail">laike@sina</a> <br>
<a href="#" target="_blank" class="mail">laike@163</a> <br>
<a href="#" target="_blank" class="mail">laike@souhu</a> <br>
<a href="#" target="_blank" class="mail">laike@hotmail</a>
</body>
</html>

本文标签: 跳转到邮箱代码页面域名