diff options
author | Kevin CHEN <33132228+KevinZonda@users.noreply.github.com> | 2021-09-04 20:08:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-05 03:08:01 +0800 |
commit | 5394433d6158422292de835dbcc55e75821bbe7b (patch) | |
tree | df6dd8507650d12ade9c1724909847f8ba3fd8dd /files/zh-cn | |
parent | ef22c6b7659e5df135eb68f05a2e2e93f7dcb8a5 (diff) | |
download | translated-content-5394433d6158422292de835dbcc55e75821bbe7b.tar.gz translated-content-5394433d6158422292de835dbcc55e75821bbe7b.tar.bz2 translated-content-5394433d6158422292de835dbcc55e75821bbe7b.zip |
Fix example code in Web/API/URL/searchParams, zh-CN (#2320)
* fix #150
* Update index.html
Diffstat (limited to 'files/zh-cn')
-rw-r--r-- | files/zh-cn/web/api/url/searchparams/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/api/url/searchparams/index.html b/files/zh-cn/web/api/url/searchparams/index.html index f782dc15c4..a3ac04aded 100644 --- a/files/zh-cn/web/api/url/searchparams/index.html +++ b/files/zh-cn/web/api/url/searchparams/index.html @@ -26,7 +26,7 @@ translation_of: Web/API/URL/searchParams <h2 id="例子">例子</h2> -<p>如果你的 URL 是 <code>https://example.com/?name=Jonathan&age=18</code> ,你可以这样解析 URL,然后得到 <code>name</code> 和 <code>age</code> 的值。</p> +<p>如果你的 URL 是 <code>https://example.com/?name=Jonathan%20Smith&age=18</code> ,你可以这样解析 URL,然后得到 <code>name</code> 和 <code>age</code> 的值。</p> <pre class="brush: js notranslate">let params = (new URL(document.location)).searchParams; let name = params.get('name'); // is the string "Jonathan Smith". |