javascript打开邮箱服务器

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OpenActiveEmailUserControl.ascx.cs"
    Inherits="UserControl_OpenActiveEmailUserControl" %>
<script type="text/javascript" language="javascript">
    function open_email_url(obj) {
        var email = document.getElementById('LabelSendEmail').innerHTML;
        var emailurl = email.split("@");
        switch (emailurl[1]) {
            case 'qq.com':
            case 'vip.qq.com':
            case 'foxmail.com':
                obj.href = 'http://mail.qq.com';
                break;
            case '163.com':
            case '126.com':
            case 'yeah.net':
                obj.href = 'http://mail.163.com';
                break;
            case '139.com':
                obj.href = 'http://mail.10086.cn';
                break;
            case 'wo.com.cn':
                obj.href = 'http://mail.wo.com.cn';
                break;
            case '189.cn':
                obj.href = 'http://webmail18.189.cn/webmail';
                break;
            case 'sohu.com':
                obj.href = 'http://mail.sohu.com';
                break;
            case '2008.sina.com':
                obj.href = 'http://mail.2008.sina.com.cn';
                break;
            case 'vip.sina.com':
            case 'sina.cn':
            case 'sina.com':
                obj.href = 'http://mail.sina.com.cn';
                break;
            case 'yahoo.com.cn':
            case 'yahoo.cn':
            case 'ymail.com':
            case 'rocketmail.com':
                obj.href = 'http://mail.cn.yahoo.com';
                break;
            case 'gmail.com':
                obj.href = 'http://mail.google.com';
                break;
            case 'hotmail.com':
            case 'live.cn':
            case 'msn.com':
            case 'passport.com':
            case 'live.com':
                obj.href = 'http://hotmail.msn.com';
                break;
            case 'tom.com':
            case 'vip.tom.com':
                obj.href = 'http://mail.tom.com';
                break;
            default:
                obj.href = 'http://mail.' + emailurl[1];
                break;
        }
    }
</script>
<style type="text/css">
    .Bord
    {
        border-color: #CDD5DE;
        border-style: double;
        border-width: 2px;
    }
    .Active
    {
        margin-left: 16%;
        padding-top: 160px;
        padding-left: 140px;
        padding-bottom: 100px;
        background-color: White;
        width: 40%;
        height: 60%;
        border-bottom-style: dashed;
        border-bottom-color: #487DB3;
        border-bottom-width: 20px;
    }
    .Open
    {
       margin-left:40px;
     }
</style>
<div class="Bord">
    <div class="Active">
        <h3>
            注册成功,请立即激活帐户</h3>
        激活链接已发送至:<asp:Label ID="LabelSendEmail" runat="server" Text=""></asp:Label><br />
        <br />
        <span class="Open">
        <a href="#" onclick="open_email_url(this);"><strong>打开邮箱激活</strong></a>
        </span>
        <br />
    </div>
</div>

 

posted @ 2012-03-26 21:24  欢喜王子  阅读(739)  评论(0编辑  收藏  举报