diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/window/setcursor/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/window/setcursor/index.html')
-rw-r--r-- | files/zh-cn/web/api/window/setcursor/index.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/setcursor/index.html b/files/zh-cn/web/api/window/setcursor/index.html new file mode 100644 index 0000000000..d87850c4d3 --- /dev/null +++ b/files/zh-cn/web/api/window/setcursor/index.html @@ -0,0 +1,32 @@ +--- +title: Window.setCursor() +slug: Web/API/Window/setCursor +translation_of: Web/API/Window/setCursor +--- +<div>{{ ApiRef() }}</div> + +<div> +<p id="comment_text_2">{{Non-standard_header}}</p> +</div> + +<div> </div> + +<h2 id="Summary" name="Summary">概要</h2> + +<p>在当前窗口中改变光标(鼠标)的样子</p> + +<h2 id="Example" name="Example">例子</h2> + +<pre class="syntaxbox">function setBusyCursor(enable) { + window.setCursor(enable ? "wait" : "auto"); +}</pre> + +<h2 id="Notes" name="Notes">提示</h2> + +<p>鼠标样式不会自动重置,需要主动设置回 <code>auto</code> 属性。</p> + +<p>这个函数方法是 <a href="/en-US/docs/XPCOM_Interface_Reference/nsIDOMChromeWindow">ChromeWindow interface</a> 的一部分. 这个方法在某些网页上不能用, 可以使用 CSS {{cssxref("cursor")}} 代替.</p> + +<h2 id="规范">规范</h2> + +<p id="comment_text_2">这不是任何规范的一部分</p> |