码迷,mamicode.com
首页 > 编程语言 > 详细

jump.html域名跳转javascript版

时间:2017-05-23 08:04:07      阅读:1023      评论:0      收藏:0      [点我收藏+]

标签:lang   跳转   域名   --   index   button   isp   family   client   

<!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版

标签:lang   跳转   域名   --   index   button   isp   family   client   

原文地址:http://www.cnblogs.com/bchome/p/6892226.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!