<script>
function setit(){
if(document.all){
document.getElementById("myframe").attachEvent("onblur",dothis);
}else{
document.getElementById("myframe").contentWindow.addEventListener("blur",dothis,false);
}
}
function dothis(){
alert("blurred");
}
</script>
<body οnlοad="setit()">
<iframe width="155" height="144" id="myframe"></iframe>
<input />
</body>
转载于:https://www.cnblogs.com/gao-qiang/archive/2012/10/31/2748839.html