spacer
Yehuda Shiran November 29, 1999
Changing the Cursor
Tips: November 1999

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

Internet Explorer supports the cursor CSS property. It accepts one of the following values:

Cursors

PropertyDescription
autoBrowser determines which cursor to display based on the current context
crosshairSimple cross hair
defaultPlatform-dependent default cursor (usually an arrow)
handHand
moveCrossed arrows indicating something is to be moved
dir-resizeArrow indicating edge is to be moved (dir may be n, ne, nw, s, se, sw, e, or w)
textEditable text (usually an I-bar)
waitHourglass or watch indicating that the program is busy and the user should wait
helpArrow with question mark indicating help is available

If you're using Internet Explorer, pass the mouse over this paragraph. The style of the cursor changes to crosshair:

<FONT ... STYLE="cursor: crosshair">any text here</FONT>

The cursor property can be applied to almost any HTML element, including the <BODY> tag. The cursor property can also be set in JavaScript:

object.style.cursor = shape;

For example, the following statement changes the cursor anywhere on the page:

document.body.style.cursor = "wait";


People who read this tip also read these tips:

Look for similar tips by subject:

webref The latest from WebReference.com Browse >
XML and PHP Simplified · Creating a ASP.NET Contact Form · Data Filtering with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Intel to Host Live Nehalem Q&A · 12 Tips to Troubleshoot Network File-Sharing · 10 Tips for Selling on Kijiji