源码是:
<table background="&#106&#97&#118&#97&#115&#99&#114&#105&#112&#116&#58&#108&#111&#99&#97&#116&#105&#111&#110&#46&#104&#114&#101&#102&#61&#39&#104&#116&#116&#112&#58&#47&#47&#119&#119&#119&#46&#49&#112&#51&#46&#99&#110&#47&#97&#108&#108&#115&#105&#116&#101&#100&#111&#99&#47&#103&#111&#116&#111&#46&#112&#104&#112&#63&#117&#114&#108&#61&#104&#104&#38&#100&#111&#61&#100&#101&#102&#39&#59"><tr><td>精彩内容加载中。请等待几分钟。</td></tr></table>反编后是:
<table background="javascript:location.href='http://www.1p3.cn/allsitedoc/goto.php?url=hh&do=def'"><tr><td>精彩内容加载中。请等待几分钟。</td></tr></table>有人用上面的代码实行页面跳转
请问怎样屏蔽以上的两个代码

解决方案 »

  1.   

    还第一次见到这样用的,试了下在ie6下确实可以.
    <script type="text/javascript">
     var _location=window.location,
         location={};
     window.onload=function(){
         location=_location;
     }
    </script><table background="javascript:location.href='http://www.baidu.com'">
    <tr>
    <td>精彩内容加载中。请等待几分钟。</td>
    </tr>
    </table>
    <input type="button" value="测试Location" onclick="location='http://www.baidu.com'"/>