提交 d4c8ce4b 编写于 作者: Z zhangyouyou

fixed 9e53927a from https://gitee.com/zhangyouyouyou/docs/pulls/13246

Modifying xml examples and modifying uri equalsTo examples
Signed-off-by: Nzhangyouyou <zhangyouyou2@huawei.com>
上级 596ef5d1
......@@ -112,8 +112,8 @@ equals(other: URI): boolean
**示例:**
```js
const uriInstance = new uri.URI('https://username:password@host:8080/directory/file?query=pppppp#qwer=da');
const uriInstance1 = new uri.URI('https://username:password@host:8080/directory/file?query=pppppp#qwer=da#fragment');
const uriInstance = new uri.URI('https://gg:gaogao@[::]:88/path/path66?foooo#gaogao');
const uriInstance1 = new uri.URI('https://gg:gaogao@[::]:88/path/path66?foooo#gaogao');
uriInstance.equals(uriInstance1);
```
### equalsTo<sup>9+</sup>
......@@ -139,8 +139,8 @@ equalsTo(other: URI): boolean
**示例:**
```js
const uriInstance = new uri.URI('https://username:password@host:8080/directory/file?query=pppppp#qwer=da');
const uriInstance1 = new uri.URI('https://username:password@host:8080/directory/file?query=pppppp#qwer=da#fragment');
const uriInstance = new uri.URI('https://gg:gaogao@[::]:88/path/path66?foooo#gaogao');
const uriInstance1 = new uri.URI('https://gg:gaogao@[::]:88/path/path66?foooo#gaogao');
uriInstance.equalsTo(uriInstance1);
```
......@@ -156,7 +156,7 @@ checkIsAbsolute(): boolean
| 类型 | 说明 |
| -------- | -------- |
| boolean | 返回true表示该URI是否为绝对URI。 |
| boolean | 如果是绝对URI返回true,否则返回false。|
**示例:**
......
......@@ -446,6 +446,15 @@ URL静态成员函数。
| url | string | 是 | 入参对象。 |
| base | string \| URL | 否 | 入参字符串或者对象。<br/>- string:字符串<br/>- URL:字符串或对象 |
**错误码:**
以下错误码的详细介绍请参见[语言基础类库错误码](../errorcodes/errorcode-utils.md)
| 错误码ID | 错误信息 |
| -------- | -------- |
| 10200002 | Invalid url string. |
**示例:**
```js
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册