<!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>
比较简单的url跳转提示代码
最新推荐文章于 2025-03-31 17:03:29 发布