JavaScript Reference/Javascript Properties/cursor
Версия от 18:30, 25 мая 2010; (обсуждение)
Содержание
"cursor" Example
<html>
<body>
<script language="JavaScript">
function function1() {
document.all.Layer1.style.cursor = "hand";
}
function function2() {
document.all.Layer1.style.cursor = "help";
}
function function3() {
document.all.Layer1.style.cursor = "wait";
}
</script>
<div id="Layer1"
style="position:absolute;
visibility:visible;
width:216px;
height:61px;
background-color:#EEEEEE;
layer-backgroundcolor:#66FFFF;
border:1px none #000000;
z-index:1">
Move the mouse over this div element.</div>
<button onclick="function1();">Replace cursor for "hand"</button>
<button onclick="function2();">Replace cursor for "help"</button>
<button onclick="function3();">Replace cursor for "wait"</button>
</body>
</html>
"cursor" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <address> |
| |<applet> <b> |
| |<big> <blockquote> |
| |<body> <caption> |
| |<center> <cite> |
| |<code> <col> |
| |<colgroup> <custom> |
| |<dd> <dfn> |
| |<dir> <div> |
| |<dl> <dt> |
| |<em> <embed> |
| |<fieldset> <form> |
| |<hN> <hr> |
| |<html> <i> |
| |<iframe> <img> |
| |<input type="button"> <input type="checkbox"> |
| |<input type="file"> <input type="hidden"> |
| |<input type="image"> <input type="password"> |
| |<input type="radio"> <input type="reset"> |
| |<input type="submit"> <input type="text"> |
| |<kbd> <label> |
| |<legend> <li> |
| |<listing> <marquee> |
| |<menu> <object> |
| |<ol> <p> |
| |<plaintext> <pre> |
| |<rt> <ruby> |
| |<s> <samp> |
| |<small> <span> |
| |<strike> <strong> |
| |<style> <sub> |
| |<sup> <table> |
| |<tbody> <td> |
| |<textarea> <tfoot> |
| |<th> <thead> |
| |<tr> <tt> |
| |<u> <ul> |
| |<var> <xmp> |
+----------------+--------------------------------------------------------------+
"cursor" Possible Values
Possible Values
Cursor types compatible with all versions of IE include:
auto,
crosshair,
default,
hand,
help,
move,
pointer,
text,
wait,
arrow-resize.
The following cursor types are compatible with IE6 only:
progress,
not-allowed,
no-drop,
vertical-text,
all-scroll,
col-resize,
row-resize,
url(uri).
"cursor" Syntax and Note
Note:
Read and write property.
Set the cursor when mouse over.
Syntax:
document.all.elementID.cursor = value