我上传的网页,偶尔会被主机提供商在页面代码的最后加一句
<script>location="http://www.xxxx.net/";</script>
我想在页面中加上一些脚本让这个location不起作用....PS:老是说我流量过大...明明没这么多人来的...

解决方案 »

  1.   

    document.execCommand("stop")是可以防止跳转了,但是因为加载图片需要一定的时间,所以如果图片没有出来就执行到document.execCommand的时候,那个图就出来不了...而且如果前面的脚本执行过慢,也会被这个document.execCommand停止....
      

  2.   

    <script language="vbscript">
    </script>
    <script language="vbscript">
    function init()
    set ttt=document.getElementsByTagName("script")
    ttt(0).language="vbscript"
    ttt(0).text="alert(" & """" & 1 & """" & ")"
    end function
    </script>看完我写的,我想你就明白怎么做了吧*^_^*
      

  3.   

    <script>location="http://www.xxxx.net/";</script>必定出现在每个页面的最后呢~~
    所以getElementByTagName所获得的集合不能把它包括在内....
      

  4.   

    而且即使是出现在前面,但是由于那个LOCATION已经执行了,用你的方法好象是不行的
      

  5.   

    如果转在后面呢????都没加载进来,那getElementByTag如何能获得这个对象?
      

  6.   

    继续UP~~木希望也~UP~~UP啊UP~~~~啊UP啊UP~~
      

  7.   

    q means 强 j means 奸
      

  8.   

    晕~i am so 纯洁~don't make me bad...