欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JavaScript decodeURI() 函數(shù)

定義和用法

decodeURI() 函數(shù)可對(duì) encodeURI() 函數(shù)編碼過(guò)的 URI 進(jìn)行解碼。

語(yǔ)法

decodeURI(URIstring)
參數(shù) 描述
URIstring 必需。一個(gè)字符串,含有要解碼的 URI 或其他要解碼的文本。

返回值

URIstring 的副本,其中的十六進(jìn)制轉(zhuǎn)義序列將被它們表示的字符替換。

實(shí)例

在本例中,我們將使用 decodeURI() 對(duì)一個(gè)編碼后的 URI 進(jìn)行解碼:

<script type="text/javascript">

var test1="http://www.dbjr.com.cn/My first/"

document.write(encodeURI(test1)+ "<br />")
document.write(decodeURI(test1))

</script>

輸出:

http://www.dbjr.com.cn/My%20first/
http://www.dbjr.com.cn/My first/

TIY

decodeURI()
如何使用 decodeURI() 對(duì)編碼后的 URI 進(jìn)行解碼。