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.com/');
document.write(result2);
</script>
</body>
</html>输出
http://www.qries.com/ https://tutorialspoint.com/
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 语言程序设计
C++
C#
MongoDB
MySQL
Javascript
PHP