Copy codeThe Code is as follows:
<! Doctype html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Title> js email address redirection </title>
<Script type = "text/javascript" src = "jquery. js"> </script>
<Script type = "text/javascript">
Var hash = {
'Qq. com': 'http: // mail.qq.com ',
'Gmail. com': 'http: // mail.google.com ',
'Sina. com': 'http: // mail.sina.com.cn ',
'2014. com': 'http: // mail.163.com ',
'2014. 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 /',
'2014. 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 ',
'2014. 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 /',
'2014. com': 'http: // www.188.com /',
'Foxmail. coom ': 'http: // www.foxmail.com'
};
$ (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.com </a> <br>
<A href = "#" target = "_ blank" class = "mail"> laike@gmail.com </a> <br>
<A href = "#" target = "_ blank" class = "mail"> laike@sina.com </a> <br>
<A href = "#" target = "_ blank" class = "mail"> laike@163.com </a> <br>
<A href = "#" target = "_ blank" class = "mail"> laike@souhu.com </a> <br>
<A href = "#" target = "_ blank" class = "mail"> laike@hotmail.com </a>
</Body>
</Html>