解决方案 »

  1.   

    <!DOCTYPE html>
    <html>
    <head>
    <script>
    document.write("<script>alert('55555')<\/script>") ;
    </script>
    </head>
    <body>
    </body>
    </html>
      

  2.   


    <script>document.write(unescape("%3Cscript type='text/javascript'%3Ealert%28%27555%27%29%3C/script%3E"));</script>
    这样就行了
      

  3.   

    把你的JS用escape做个编码,然后用上面的语句解码后即可执行
      

  4.   

    document.write("<script>alert('55555')</scr"+"ipt>") 
      

  5.   

    哈哈,一帮人都钻牛角了。直接 alert("555555")就OK了.
      

  6.   

    嗯 你说的很对我真搞不懂又不是后台干嘛要输出直接在前台alert("1111") 就行了
    ClientScript.RegisterStartupScript(this.GetType(), "", "alert('1111')", true) 后台的话就这样
      

  7.   

    document.write("<scr"+"ipt>alert('55555')</scr"+"ipt>") script 产生了歧义,需要将其拆断
    手册中虽然没有明说,但示例代码中就有