Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q185 How do I change the cursor in Internet Explorer 4?

irt.org | Knowledge Base | JavaScript | Pointer | Q185 [ previous next ]

Q185 How do I change the cursor in Internet Explorer 4?

Do not use onMouseOver to change the cursor. What you need to do is once the item has been created and given an ID, to then use JavaScript to set the cursor for that item:

<a href="apage.html" id="myLink">go somewhere</a>

<img id="myPicture" src="picture.gif" width="16" height="16">

<p id="myText">Some text</p>

<span id="mySpan">Some text within a span tag</span> followed by text outside the span tags.

<script language="JavaScript"><!--
if (document.all) {
    document.all("myLink").style.cursor = 'wait';
    document.all("myText").style.cursor = 'hand';
    document.all("myPicture").style.cursor = 'crosshair';
    document.all("mySpan").style.cursor = 'move';
}
//--></script>

The following cursors are available:

auto | crosshair | default | hand | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help

Feedback on 'Q185 How do I change the cursor in Internet Explorer 4?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.