From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/window/setcursor/index.html | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 files/zh-cn/web/api/window/setcursor/index.html (limited to 'files/zh-cn/web/api/window/setcursor/index.html') 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 +--- +
{{ ApiRef() }}
+ +
+

{{Non-standard_header}}

+
+ +
 
+ +

概要

+ +

在当前窗口中改变光标(鼠标)的样子

+ +

例子

+ +
function setBusyCursor(enable) {
+  window.setCursor(enable ? "wait" : "auto");
+}
+ +

提示

+ +

鼠标样式不会自动重置,需要主动设置回 auto 属性。

+ +

这个函数方法是 ChromeWindow interface 的一部分. 这个方法在某些网页上不能用, 可以使用 CSS {{cssxref("cursor")}} 代替.

+ +

规范

+ +

这不是任何规范的一部分

-- cgit v1.2.3-54-g00ecf