diff --git a/en/application-dev/reference/apis/js-apis-url.md b/en/application-dev/reference/apis/js-apis-url.md index fcfc892f85f4220e3df4fa21e0a1337c7de9d2f8..6ca9f8ae9b4bce6bef3140ad7ed762f43ffffe68 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**