Javascript examples for CSS Style Property:cursor
The cursor property sets or gets the type of cursor.
Value |
---|
alias |
all-scroll |
auto |
cell |
context-menu |
col-resize |
copy |
crosshair |
default |
e-resize |
ew-resize |
help |
move |
n-resize |
ne-resize |
nesw-resize |
ns-resize |
nw-resize |
nwse-resize |
no-drop |
none |
not-allowed |
pointer |
progress |
row-resize |
s-resize |
se-resize |
sw-resize |
text |
URL |
vertical-text |
w-resize |
wait |
zoom-in |
zoom-out |
initial |
inherit |
Item | Value |
---|---|
Default Value: | auto |
Return Value: | A String, representing the displayed mouse cursor when the mouse pointer is over an element |
CSS Version | CSS2 |
Get the cursor type value
<!DOCTYPE html> <html> <body> <p id="myP" style="cursor:wait;">This is a paragraph. Mouse over me.</p> <button type="button" onclick="myFunction()">Return type of cursor</button> <script> function myFunction() {//from w ww. j a va2 s . c o m console.log(document.getElementById("myP").style.cursor); } </script> </body> </html>