当前位置: 代码迷 >> ASP >> JS的decodeURIComponent()函数用ASP如何实现
  详细解决方案

JS的decodeURIComponent()函数用ASP如何实现

热度:312   发布时间:2013-09-07 14:12:44.0
JS的decodeURIComponent()函数用ASP怎么实现
JS的decodeURIComponent()函数用ASP怎么实现

------解决方案--------------------
后台直接调用JS函数

<%
 response.write jsDecodeURIComponent( "%E6%B5%8B%E8%AF%95"  )
%>
<script language="jscript" runat="server">
 function jsDecodeURIComponent(str){return decodeURIComponent(str) }
</script>

------解决方案--------------------
<script type="text/javascript">
    var url="http://www.w3school.com.cn/";
    document.write(encodeURIComponent(url));
</script>
Response.write Server.URLEncode("http://www.w3school.com.cn/")