aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/url/protocol
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/protocol
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/protocol')
-rw-r--r--files/zh-cn/web/api/url/protocol/index.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/url/protocol/index.html b/files/zh-cn/web/api/url/protocol/index.html
new file mode 100644
index 0000000000..2774282d7e
--- /dev/null
+++ b/files/zh-cn/web/api/url/protocol/index.html
@@ -0,0 +1,55 @@
+---
+title: URL.protocol
+slug: Web/API/URL/protocol
+translation_of: Web/API/URL/protocol
+---
+<div>{{ApiRef("URL API")}}</div>
+
+<div>{{domxref("URL")}}接口的<strong><code>protocol</code></strong>是一个包含URL协议的{{domxref("USVString")}}值,此值包含协议后的<code>':'</code>.</div>
+
+<p>{{AvailableInWorkers}}</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><em>string</em> = <em>object</em>.protocol;
+<em>object</em>.protocol = <em>string</em>;
+</pre>
+
+<h3 id="参数">参数</h3>
+
+<p>A {{domxref("USVString")}}.</p>
+
+<h2 id="示例">示例</h2>
+
+<pre class="brush: js">var url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol');
+var result = url.protocol; // Returns:"https:"
+</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-protocol', 'protocol')}}</td>
+ <td>{{Spec2('URL')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.URL.protocol")}}</p>
+
+<h2 id="其他链接">其他链接</h2>
+
+<ul>
+ <li>The {{domxref("URL")}} interface it belongs to.</li>
+</ul>