首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

怎么过滤iframe里面的script和图片

2012-02-16 
如何过滤iframe里面的script和图片 我想调用别人的一个页面,试图用iframe的方法来引用对方的页面。对方的页

如何过滤iframe里面的script和图片

我想调用别人的一个页面,试图用   iframe的方法来引用对方的页面。

对方的页面地址:http://weblive.hichannel.hinet.net/hiliveModule/player.jsp?cid=39

但对方的页面有判断,如下:

<SCRIPT   language= "JavaScript ">
try{
    var   loc   =   parent.document.location   +   ' ';
//document.writeln( 'Location   :   '   +   loc);
if   (   loc.indexOf( 'http://weblive.hichannel.hinet.net ')   !=   -1)
      ;//document.writeln( "ok "   +   loc.indexOf( 'http://weblive.hichannel.hinet.net '));
  else
                {
                    //document.writeln( "no "   +   loc.indexOf( 'http://weblive.hichannel.hinet.net '));
                    parent.window.document.location   =   'http://weblive.hichannel.hinet.net/ ';
                }
}
catch(e)
{
    //alert(e.message   );
    //document.location   =   'http://weblive.hichannel.hinet.net ';
    window.open( 'http://weblive.hichannel.hinet.net ',   '_top ');
}

</script>

谢谢。

[解决办法]
通过XMLHttp获取那一页的生成的HTML代码,过滤之后显示

热点排行