比较简单的url跳转提示代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="/js/jquery.js"></script>
    <style>
        /* = 全局样式...
        ------------------------------------------------------------ */
        div, form, img, ul, ol, li, dl, dt, dd, p, b, span, strong {border: 0 none;margin: 0;padding: 0;}
        li {list-style-type: none;}
        img {vertical-align: top;}
        h1, h2, h3, h4, h5, h6 {font-size: 14px;margin: 0;padding: 0;}
        #clear{ clear:both;}
        /* 链接样式 */
        a { color:#ec2028;text-decoration: none;font-family:"微软雅黑";}
        a:hover {color: #1A8300;text-decoration: underline;}
        a.more { color:#F60; }
        a.more:hover { color:#000; }
        .tc_box{ width:380px; overflow:hidden; margin:0 auto; border:1px #efefef solid; background-color:#FFF; position:relative; top:0; left:0;}
        .tc_box_title{ width:380px; height:30px; border-bottom:1px #efefef solid; background-color:#f3f3f3; font-size:14px; font-weight:bold; line-height:30px; text-indent:20px;}
        .tc_box_nr{ text-align:center;width:340px; overflow:hidden; margin:10px 0 0 20px;}
        .tc_box_nr p{ display:block; font-size:16px;font-family:"微软雅黑";  color:#666; line-height:22px;}
        .tc_box_but{ text-align: center;font-size: 12px; width:380px; height:30px; margin:20px 0 0 0;}
        .popup-close{
            width:10px; color:#666; font-family:"微软雅黑"; font-size:14px;
            height:10px;
            float:left;
            position:absolute;
            left: 360px;
            top: 5px; cursor:pointer
        }
        .tcwz{ width:150px; height:20px;}
        /*main end*/
        /*遮罩层*/
        .none{display: none;}

    </style>
</head>
<body>
<!---弹窗自定义html内容---->
<div class="tc_box">
    <div class="tc_box_title">温馨提示')</div>
    <div class="tc_box_nr">
        <p><?php echo $message;?></p>
    </div>
    <div class="tc_box_but"><a href="xxx.com"><span id="time">3</span>秒钟后自动跳转!浏览器没反应?点击这里继续</a></div>
    <div class="popup-close">X</div>
</div>

</body>

<script language="JavaScript" type="text/javascript">
    function delayURL(url) {
        var delay = document.getElementById("time").innerHTML;
        if(delay > 0) {
            delay--;
            document.getElementById("time").innerHTML = delay;
        } else {
            window.top.location.href = url;
        }
        setTimeout("delayURL('" + url + "')", 1000);
    }
</script>
<script type="text/javascript">
    delayURL("xxx.com");
</script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值