8.7w+
社区成员
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function test(v_1, th_is) {
document["getElementById"]("main")["innerHTML"] = "<IFRAME src='https://openload.co/embed/" + v_1 + "' height='416px' width='668px' scrolling='no' frameBorder='0' allowfullscreen='allowfullscreen'></IFRAME>";
};
</script>
</head>
<body>
<div class="main" id="main">
</div>
<li><a href='#' onclick="test('EP4X3D5b5IE',this)">测试1</a></li>
<li><a href='#' onclick="test('aaaaaaa',this)">测试2</a></li>
</body>
</html>
IFRAME的 onload = function () {
try {
if (this.contentWindow.suburl==undefined) {alert("不正常的页面");}
} catch(eo){
alert("不正常的页面");
}
}
不过这种方法在遇到网络堵塞或者服务器出问题时也会判断成不正常的页面