jump.html域名跳转javascript版
Posted 百草之家
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jump.html域名跳转javascript版相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html> <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>APP下载</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"> <meta name="description" content=""> <meta name="keywords" content=""> <!--后台全部样式开始--> <!--gongyong--> <!--手机扫描样式开始--> <link rel="stylesheet" href="/images/apk/phoneScan.css"> <!--手机扫描样式结束--> <style> .other_a{ display: table; width: 95%; height: 132px; line-height: 132px; text-align: center; } *{margin:0; padding:0;} img{max-width: 100%; height: auto;} .test{height: 600px; max-width: 600px; font-size: 40px;} #button1 { width: 100px; height: 30px; font-size: 18px; font-family: 微软雅黑; letter-spacing: 8px; padding-left: 12px; border-radius: 5px; background: -webkit-linear-gradient(top, #66B5E6, #2e88c0); background: -moz-linear-gradient(top, #66B5E6, #2e88c0); background: linear-gradient(top, #66B5E6, #2e88c0); background: -ms-linear-gradient(top, #66B5E6, #2e88c0); border: 1px solid #2576A8; box-shadow: 0 1px 2px #B8DCF1 inset, 0 -1px 0 #316F96 inset; color: #fff; text-shadow: 1px 1px 0.5px #22629B; } #button1:hover { background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1); background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1); background: linear-gradient(top, #8DC9EF, #4E9FD1); background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1); } </style> <style></style></head> <body> <script type="text/javascript"> function is_weixin() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == "micromessenger" || ua.match(/qbweb/) == "qbweb" || ua.match(/qbrowser/) == "qbrowser") { return true; } else { return false; } } var isWeixin = is_weixin(); var winHeight = typeof window.innerHeight != ‘undefined‘ ? window.innerHeight : document.documentElement.clientHeight; function loadHtml(){ var div = document.createElement(‘div‘); div.id = ‘weixin-tip‘; div.innerHTML = ‘<p><img src="live_weixin.png" alt="微信打开"/></p>‘; document.body.appendChild(div); } function loadStyleText(cssText) { var style = document.createElement(‘style‘); style.rel = ‘stylesheet‘; style.type = ‘text/css‘; try { style.appendChild(document.createTextNode(cssText)); } catch (e) { style.styleSheet.cssText = cssText; //ie9以下 } var head=document.getElementsByTagName("head")[0]; //head标签之间加上style样式 head.appendChild(style); } var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}"; if(isWeixin){ loadHtml(); loadStyleText(cssText); } else{ location.href="http://wap.1270806.com/"; } </script> </body></html>
以上是关于jump.html域名跳转javascript版的主要内容,如果未能解决你的问题,请参考以下文章