标签:code java ext javascript http type com amp text doc js
encodeURI() 函数可把字符串作为 URI 进行编码。
--------------------------------------------------------------------------------------------
输入:
<script
type="text/javascript">
document.write(encodeURI("http://www.w3school.com.cn")
+
"<br />")
document.write(encodeURI("http://www.w3school.com.cn/My
first/")
)
document.write(encodeURI(",/?:@&=+$#")
)
</script>
-------------------------------------------------------------------------------------------------
输出:
http://www.w3school.com.cn
http://www.w3school.com.cn/My%20first/
,/?:@&=+$#
原文链接:http://www.w3school.com.cn/jsref/jsref_encodeuri.asp
JavaScript encodeURI() 函数,码迷,mamicode.com
标签:code java ext javascript http type com amp text doc js
原文地址:http://www.cnblogs.com/tanglc/p/3700833.html