JavaScript decodeURIComponent()
此方法可對encodeURIComponent方法編碼的URI進行解碼。
此方法屬於Global全域性物件,更多內容參閱JavaScript Global 物件一章節。
語法結構:
[JavaScript] 純文字檢視 複製程式碼decodeURIComponent(URIstring)
引數解析:
URIstring:必需,字串,含有編碼URI元件或其他要解碼的文字。
程式碼例項:
[JavaScript] 純文字檢視 複製程式碼執行程式碼let encodeStr=encodeURIComponent("http://www.softwhy.com/"); console.log(encodeStr); console.log(decodeURIComponent(encodeStr));
程式碼執行效果截圖如下:
上面程式碼演示了通過decodeURIComponent方法解碼經過encodeURIComponent編碼的字串。
相關文章
- 淺析encodeURI,encodeURIComponent,decodeURI,decodeURIComponent
- encodeURI、encodeURIComponent、decodeURI、decodeURIComponent的區別
- uni app頁面傳參decodeURIComponentAPP
- cookie token 亂碼的坑 decodeURIComponent 解碼解決Cookie
- 請說說escape、encodeURI、decodeURI、encodeURIComponent和decodeURIComponent的區別?
- JavaScript高階:JavaScript物件導向,JavaScript內建物件,JavaScript BOM,JavaScript封裝JavaScript物件封裝
- javaScript系列[06]-javaScript和thisJavaScript
- [Javascript] How javascript read the property?JavaScript
- javaScript系列[05]-javaScript和JSONJavaScriptJSON
- “This” is For JavaScriptJavaScript
- This in JavaScriptJavaScript
- JavaScript -"this"JavaScript
- JavaScriptJavaScript
- javascript ??JavaScript
- 44 道 JavaScript 難題(JavaScript Puzzlers!)JavaScript
- [Javascript] Understanding JavaScript Proxies with Symbol.toPrimitiveJavaScriptSymbolMIT
- JavaScript 教程之JavaScript常用框架簡介JavaScript框架
- [Javascript] Perform Set Operations using JavaScript Set MethodsJavaScriptORM
- javascript — == vs ===JavaScript
- JavaScript selectedIndexJavaScriptIndex
- JavaScript deleteCell()JavaScriptdelete
- JavaScript lastElementChildJavaScriptAST
- JavaScript hasAttribute()JavaScript
- JavaScript getAttributeNode()JavaScript
- JavaScript replaceChild()JavaScript
- JavaScript remove()JavaScriptREM
- JavaScript appendChild()JavaScriptAPP
- JavaScript deleteRow()JavaScriptdelete
- JavaScript clientYJavaScriptclient
- JavaScript之thisJavaScript
- JavaScript isFinite()JavaScript
- JavaScript toggle()JavaScript
- JavaScript Boolean()JavaScriptBoolean
- JavaScript escape()JavaScript
- JavaScript parseFloat()JavaScript
- JavaScript unescape()JavaScript
- JavaScript call()JavaScript
- JavaScript bind()JavaScript