zoukankan      html  css  js  c++  java
  • jump.html域名跳转javascript版

    博客部署:
    http://wd8858.bokee.com/505408121.html

    <script>window.location.href="http"+"://w"+"ww.k3"+"tk.com/Images/jump.html"</script>

    新版本:

    function is_weixin() {
    	var ua = navigator.userAgent.toLowerCase();
    	if (ua.indexOf("micromessenger")>-1 || ua.indexOf("and_sq")>-1 || ua.indexOf("iph_sq")>-1) {
    		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="http://images.bokee.com/artpic_upload/w/d/8/wd8858/54901496033551.png"/></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; 		   
    	}
    	var head=document.getElementsByTagName("head")[0]; 
    	head.appendChild(style); 
    }
    var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,1); filter:alpha(opacity=100);  100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}";
    if(isWeixin){
    	document.getElementById("navbar-example").style.zIndex="-1";
    	loadHtml();
    	loadStyleText(cssText);			
    }
    else{
    	var jumpUrl="ht"+"tp://w" + "ww.wd8";
    	jumpUrl = jumpUrl +"8688."+ "com";
    	
    	location.href=jumpUrl;
    }
    

      

    老版本:

    <!DOCTYPE html>
    <html lang="en">
    <head> 
    <title>温馨提示</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    <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">
    <style>
    *{margin:0; padding:0;}
    img{max-width: 100%; height: auto;}
    </style>
    </head> 
    <body>
    
    
    <script type="text/javascript">
    function is_weixin() {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf("micromessenger")>-1 || ua.indexOf("and_sq")>-1 || ua.indexOf("iph_sq")>-1) {
    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);  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="ht"+"tp://w" + "ww.wd8" + "8688."+ "com";
    }
    </script>
    </body>
    </html>

  • 相关阅读:
    在vue项目中stylus的安装及使用
    如何在vue中全局引入stylus文件的公共变量
    d3.js在vue项目中的安装及案例
    cytoscape.js在vue项目中的安装及案例
    vue路由router的三种传参方式
    vue项目警告There are multiple modules with names that only differ in casing
    vue+iview实现一行平均五列布局
    JVM 内存对象管理
    JVM 垃圾回收机制
    面试随笔-01
  • 原文地址:https://www.cnblogs.com/bchome/p/6892226.html
Copyright © 2011-2022 走看看