HTML DOM cursor ÊôÐÔ

HTML DOM Style ¶ÔÏó

¶¨ÒåºÍÓ÷¨

cursor ÊôÐԹ涨ËùÏÔʾµÄÖ¸Õ루¹â±ê£©µÄÀàÐÍ¡£

Óï·¨£º

Object.style.cursor=cursortype

¿ÉÄܵÄÖµ

Öµ ÃèÊö
url

Ð豻ʹÓõÄ×Ô¶¨Òå¹â±êµÄURL

×¢ÊÍ£ºÇëÔÚ´ËÁбíµÄÄ©¶ËʼÖÕ¶¨ÒåÒ»ÖÖÆÕͨµÄ¹â±ê£¬ÒÔ·ÀûÓÐÓÉ URL ¶¨ÒåµÄ¿ÉÓùâ±ê¡£

default ĬÈϹâ±ê£¨Í¨³£ÊÇÒ»¸ö¼ýÍ·£©
auto ĬÈÏ¡£ä¯ÀÀÆ÷ÉèÖõĹâ±ê¡£
crosshair ¹â±ê³ÊÏÖΪʮ×ÖÏß¡£
pointer ¹â±ê³ÊÏÖΪָʾÁ´½ÓµÄÖ¸Õ루һֻÊÖ£©
move ´Ë¹â±êָʾij¶ÔÏó¿É±»Òƶ¯¡£
e-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»ÏòÓÒ£¨¶«£©Òƶ¯¡£
ne-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»ÏòÉϼ°ÏòÓÒÒÆ¶¯£¨±±/¶«£©¡£
nw-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»ÏòÉϼ°Ïò×óÒÆ¶¯£¨±±/Î÷£©¡£
n-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»ÏòÉÏ£¨±±£©Òƶ¯¡£
se-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»Ïòϼ°ÏòÓÒÒÆ¶¯£¨ÄÏ/¶«£©¡£
sw-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»Ïòϼ°Ïò×óÒÆ¶¯£¨ÄÏ/Î÷£©¡£
s-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»ÏòÏÂÒÆ¶¯£¨±±/Î÷£©¡£
w-resize ´Ë¹â±êָʾ¾ØÐοòµÄ±ßÔµ¿É±»Ïò×óÒÆ¶¯£¨Î÷£©¡£
text ´Ë¹â±êָʾÎı¾¡£
wait ´Ë¹â±êָʾ³ÌÐòÕý棨ͨ³£ÊÇÒ»Ö»±í»òɳ©£©¡£
help ´Ë¹â±êָʾ¿ÉÓõİïÖú£¨Í¨³£ÊÇÒ»¸öÎʺŻòÒ»¸öÆøÇò£©¡£

ʵÀý

±¾Àý¸Ä±äÖ¸Õ룺

<html>
<head>
<script type="text/javascript">
function changeCursor()
{
document.body.style.cursor="crosshair";
document.getElementById("p1").style.cursor="text";
}
</script>
</head>
<body>

<p id="p1">This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text.</p>

<input type="button" onclick="changeCursor()"
value="Change cursor" />

</body>
</html>

HTML DOM Style ¶ÔÏó

VUE