JavaScript Reference/Javascript Properties/cursor

Материал из Web эксперт
Перейти к: навигация, поиск

"cursor" Example

   <source lang="javascript">
   

<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>

Move the mouse over this div element.

<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>


     </source>
   
  


"cursor" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | |<applet> |

| |
|

| |<body> |

| |
|

| | <col> | | |<colgroup> <custom> | | |

|

| |<dir>
| | |
| | | <embed> | | |<fieldset> <form> | | |<hN>
|

| |<html> | | |<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"> | | | <label> |

| |<legend>
  • | | |<listing> <marquee> | | |<menu> <object> | | |

      | | |<plaintext>

                               |
      |                |                                                    |
      |                |                                                     |
      |                |                                                 |
      |                |                                              |
      |                |<style>                                                  |
      |                |                                                  |
      |                |<tbody>                                                   |
      |                |                             
        | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>

        "cursor" Possible Values

        <source lang="javascript"> 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).


        </source>



        "cursor" Syntax and Note

        <source lang="javascript"> Note: Read and write property. Set the cursor when mouse over.

        Syntax:

        document.all.elementID.cursor = value


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |