SOURCE

console 命令行工具 X clear

                    
>
console
<iframe id="mainFrame" src="http://jsrun.net/rtd/3wyKp"  frameborder="0">
</iframe>
 
<script>
 
function iframeSrcChanged( )  {
  var url=mainFrame.l
  if (newValue.indexOf('sina') > -1) {
    console.log('有危险,请马上离开……') ;
    iframeObj.src = oldValue; //钓鱼地址,恢复原url
  } else {
    console.log('安全地址,允许跳转……');
  }
}</script>