JavaScript 中 decodeURI() 函式
decodeURI() 函式接受一個表示編碼的 URI 的字串值,對該字串進行解碼並返回結果字串。
語法
語法如下所示
decodeURI('http://www.qries.com/');示例
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result1 = decodeURI('http://www.qries.com/');
document.write(result1);
document.write("<br>");
var result2 = decodeURI('https://tutorialspoint.tw/');
document.write(result2);
</script>
</body>
</html>輸出
http://www.qries.com/ https://tutorialspoint.tw/
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP