We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbf0de0 commit 9195d65Copy full SHA for 9195d65
docs/url.md
@@ -18,10 +18,10 @@ let url = new URL('https://example.com');
18
19
```javascript
20
const url1 = new URL('page2.html', 'http://example.com/page1.html');
21
-url2.href // "http://example.com/page2.html"
+url1.href // "http://example.com/page2.html"
22
23
const url2 = new URL('..', 'http://example.com/a/b.html')
24
-url3.href // "http://example.com/"
+url2.href // "http://example.com/"
25
```
26
27
这种写法很方便基于现有网址,构造新的 URL。
0 commit comments