From cdcb16ff8dbe38b13799dcff6d3f2f4108325c27 Mon Sep 17 00:00:00 2001 From: wusongqing Date: Sat, 12 Mar 2022 16:26:30 +0800 Subject: [PATCH] updated docs Signed-off-by: wusongqing --- en/application-dev/reference/apis/js-apis-url.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-url.md b/en/application-dev/reference/apis/js-apis-url.md index fcfc892f85..6ca9f8ae9b 100644 --- a/en/application-dev/reference/apis/js-apis-url.md +++ b/en/application-dev/reference/apis/js-apis-url.md @@ -27,7 +27,7 @@ Creates a **URLSearchParams** instance. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| init | string[][] \| Record<string, string> \| string \| URLSearchParams | No| Input parameter objects, which include the following:
- **string[][]**: two-dimensional string array
- **Record<string, string>**: list of objects
- **string**: string
- **URLSearchParams**: object| +| init | string[][] \| Record<string, string> \| string \| URLSearchParams | No| Input parameter objects, which include the following:
- **string[][]**: two-dimensional string array
- **Record<string, string>**: list of objects
- **string**: string
- **URLSearchParams**: object| **Example** @@ -36,7 +36,7 @@ var objectParams = new URLSearchParams([ ['user1', 'abc1'], ['query2', 'first2'] var objectParams1 = new URLSearchParams({"fod" : 1 , "bard" : 2}); var objectParams2 = new URLSearchParams('?fod=1&bard=2'); var urlObject = new URL('https://developer.mozilla.org/?fod=1&bard=2'); -var params = new URLSearchParams(urlObject .search); +var params = new URLSearchParams(urlObject.search); ``` @@ -79,7 +79,7 @@ Deletes key-value pairs of the specified key. ``` let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); let paramsobject = new URLSearchParams(urlObject.search.slice(1)); -paramsobject.delete('foo'); +paramsobject.delete('fod'); ``` @@ -106,7 +106,7 @@ Obtains all the key-value pairs based on the specified key. ``` let urlObject = new URL('https://developer.exampleUrl/?fod=1&bard=2'); let paramsObject = new URLSearchParams(urlObject.search.slice(1)); -paramsObject.append('fod', 3); // Add a second value for the foo parameter. +paramsObject.append('fod', 3); // Add a second value for the fod parameter. console.log(params.getAll('fod')) // Output ["1","3"]. ``` @@ -121,7 +121,7 @@ Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and th | Type| Description| | -------- | -------- | -| IterableIterator<[string, string]> | An ES6 iterator.| +| IterableIterator<[string, string]> | ES6 iterator.| **Example** @@ -382,7 +382,7 @@ Creates a URL. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | url | string | Yes| Input object.| -| base | string \| URL | No| Input parameter, which can be any of the following:
- **string**: string
- **URL**: string or object| +| base | string \| URL | No| Input parameter, which can be any of the following:
- **string**: string
- **URL**: string or object| **Example** -- GitLab