如果<script > alert(encodeURI('好好学习'))</script>, 那么将会弹出“好好学习”的utf编码,现在问题是如何把这个编码取出来?用什么方式???

解决方案 »

  1.   

    <?php
    $s = "<script > document.write(encodeURI('好好学习'));</script>";
    echo $s;
    ?>
      

  2.   


    <input type="text" value="" id="id" style="width:600px;"><script > document.getElementById('id').value=encodeURI('好好学习');</script>
      

  3.   

    估计LZ又在问js的值,如何被php使用的老问题。
    js->http request->php->http response->js
      

  4.   

    <input type="text" value="" id="id" style="width:600px;" onblur="window.location+='?encodeuri='+encodeURI('好好学习');">