Name

cursor — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

The shape of the cursor when the screen pointer is atop the element. The precise look of cursors depends on the operating system. Before deploying a modified cursor, be sure you understand the standard ways that the various types of cursors are used within the browser and operating system. Users expect a cursor design to mean the same thing across all applications. Figure 10.3 in Chapter 10 offers a gallery of Windows and Macintosh cursors for each of the cursor constant settings provided by Internet Explorer 4.

Setting this property affects the cursor only when it is atop the current element and does not set the cursor immediately on a global basis.

Example

if (event.altKey) {
    event.sourceElement.style.cursor = "help"
}

Value

Any one cursor constant as a string: auto | crosshair | default | e-resize | help | move | n-resize | ne-resize | nw-resize | pointer | s-resize | se-resize | sw-resize | text | wait.

Default

auto

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.