国产精品白浆熟女,国产偷亚洲偷欧美偷精品,,新免费无码国产在线看,国产激情久久久久影院老熟女

首頁 加密 & 解密 URL轉(zhuǎn)碼

下面有 encodeURIComponent() 和 encodeURI() 函數(shù)的區(qū)別細(xì)介紹點(diǎn)擊查看

URL轉(zhuǎn)碼介紹 & URL 編碼演示

一、encodeURIComponent()

1.encodeURIComponent()方法的使用

語法:encodeURIComponent(URIstring)
參數(shù):URIstring,必需。一個(gè)字符串,含有 URI 組件或其他要編碼的文本。

2.encodeURIComponent()測(cè)試

測(cè)試

document.write(encodeURIComponent("http://zijieyoumin.cn/encodeurl.html?我是個(gè)中文參數(shù)"))
document.write("<br />")
document.write(encodeURIComponent(",/?:@&=+$#"))

結(jié)果

http%3A%2F%2Fzijieyoumin.cn%2Fencodeurl.html%3F%E6%88%91%E6%98%AF%E4%B8%AA%E4%B8%AD%E6%96%87%E5%8F%82%E6%95%B0
%3Cbr%20%2F%3E
%2C%2F%3F%3A%40%26%3D%2B%24%23

二、encodeURI()測(cè)試

測(cè)試

document.write(encodeURI("http://zijieyoumin.cn/encodeurl.html?我是個(gè)中文參數(shù)"))
document.write("<br />")
document.write(encodeURI(",/?:@&=+$#"))

結(jié)果

http://zijieyoumin.cn/encodeurl.html?%E6%88%91%E6%98%AF%E4%B8%AA%E4%B8%AD%E6%96%87%E5%8F%82%E6%95%B0
%3Cbr%20/%3E
,/?:@&=+$#

三、 encodeURIComponent() 函數(shù) 與 encodeURI() 函數(shù)的區(qū)別

請(qǐng)注意 encodeURIComponent() 函數(shù) 與 encodeURI() 函數(shù)的區(qū)別之處,前者假定它的參數(shù)是 URI 的一部分(比如協(xié)議、主機(jī)名、路徑或查詢字符串)。因此 encodeURIComponent() 函數(shù)將轉(zhuǎn)義用于分隔 URI 各個(gè)部分的標(biāo)點(diǎn)符號(hào)。

廣告 for Goolge

支付掃碼

所有贊助/開支都講公開明細(xì),用于網(wǎng)站維護(hù):贊助名單查看

查看我的收藏

正在加載... ...