87,910
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
alert(document.getElementById("iframeID").contentWindow.document);
document.getElementById("iframeID").contentWindow.onload=function() {
var arr=this.document.getElementsByTagName("a");
for(var i=0;i<arr.length;i++) {alert("c");
(function(a) {
a.onclick=function() {
openOn(this.href);
return false;
}
})(arr[i]);
}
}
var openOn=function(url) {
var i=window.open("_blank");
i.opener.focus();
i.location=url;
};
</script>