Most browsers today support the pointer style (move the mouse over the style name to observe that the pointer style is changed to that style):
auto move no-drop col-resize
all-scroll pointer not-allowed row-resize
crosshair progress e-resize ne-resize
default text n-resize nw-resize
help vertical-text s-resize se-resize
inherit wait w-resize sw-resize
In Windows Internet Explorer 6.0 or later version, the above pointer style is as follows:
To change the mouse pointer style of an element through a script, you can set the element's attribute element.style.cursor to any of the above values. (Another method that does not use javascript, you can use attributes in the html tag of the element):
The code copy is as follows:
function setcursorbyid(id,cursorstyle) {
if (document.getelementbyid) {
if (document.getelementbyid(id).style) {
document.getelementbyid(id).style.cursor=cursorstyle;
}
}
}
Add a commonly used method to change the mouse style: if you want to move the mouse to an element to change the mouse style, add cursor: (the style you want to change).