aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/url/密码/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/url/密码/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/url/密码/index.html')
-rw-r--r--files/zh-cn/web/api/url/密码/index.html57
1 files changed, 57 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/url/密码/index.html b/files/zh-cn/web/api/url/密码/index.html
new file mode 100644
index 0000000000..1592676a9d
--- /dev/null
+++ b/files/zh-cn/web/api/url/密码/index.html
@@ -0,0 +1,57 @@
+---
+title: URL.密码
+slug: Web/API/URL/密码
+translation_of: Web/API/URL/password
+---
+<div>{{ApiRef("URL API")}}</div>
+
+<p> {{domxref("URL")}}<span class="tlid-translation translation" lang="zh-CN"><span title="">接口的<strong><code>password</code></strong>属性为</span></span>{{domxref("USVString")}}<span class="tlid-translation translation" lang="zh-CN"><span title="">,其中包含在域名之前指定的密码。</span></span></p>
+
+<p><span class="tlid-translation translation" lang="zh-CN"><span title="">如果在未设置</span></span><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/API/URL/username">username</a><span class="tlid-translation translation" lang="zh-CN"><span title="">属性的情况下进行调用,默认失败。</span></span></p>
+
+<p>{{AvailableInWorkers}}</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><em>string</em> = <em>object</em>.password;
+<em>object</em>.password = <em>string</em>;
+</pre>
+
+<h3 id="值">值</h3>
+
+<p>A {{domxref("USVString")}}.</p>
+
+<h2 id="Examples">Examples</h2>
+
+<pre class="brush: js">var url = new URL('https://anonymous:flabada@developer.mozilla.org/en-US/docs/Web/API/URL/password');
+var result = url.password; // Returns:"flabada"
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('URL', '#dom-url-password', 'URL.password')}}</td>
+ <td>{{Spec2('URL')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容">浏览器兼容</h2>
+
+
+
+<p>{{Compat("api.URL.password")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>The {{domxref("URL")}} interface it belongs to.</li>
+</ul>