JavaScript 中的 decodeURI() 函数
htmljavascriptprogramming scripts更新于 2024/10/17 11:24:17
decodeURI() 函数接受表示编码 URI 的字符串值,对其进行解码并返回结果字符串。
语法
其语法如下
decodeURI('http://www.qries.com/');
示例
<html>
<head>
<title>JavaScript 示例</title>
</head>
<body>
<script type="text/javascript">
var result1 = decodeURI('http://www.qries.com/');
document.write(result1);
document.write("<br>");
var result2 = decodeURI('http://www.tutorialspoint.com/');
document.write(result2);
</script>
</body>
</html>
输出
http://www.qries.com/ http://www.tutorialspoint.com/
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

