JavaScript Reference/Javascript Properties/readyState

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

"readyState" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript">

   function function1() {
       var m = document.all.myI.readyState; 
       alert(m);
   }

</script> <img id="myI" src="yourimage.jpg" alt="" width="300" height="225"> <input type="button" value="Get the state of the image object" onclick="function1();"> </body> </html>


     </source>
   
  


"readyState" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> | | | <bgsound> |

| |
|

| |<body>
| | |<button> |

| |
|

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

| | | |

| |<dir>
| | |
document | | |
| | |<embed> <fieldset> | | | <form> | | |<frame> <frameset> | | |<head> <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"> | | |<isindex> | | |<label> <legend> |

| |
  • <link> | | |<listing> <map> | | |<marquee> <menu> | | |namespace <nobr> | | |<noframes> <noscript> | | |<object>
      | | |<option>

      | | |<plaintext>

                               |
      |                |                                                       |
      |                |                                                     |
      |                |                          <script>                      |
      |                |<select>                                               |
      |                |                                                |
      |                |                                                 |
      |                |                                                  |
      |                |<tbody>                                                   |
      |                |                                                       |
      |                |
        | | |<xml> <xmp> | +----------------+--------------------------------------------------------------+ </source>

        "readyState" Possible Values

        <source lang="javascript"> Possible Values complete object and data are fully loaded interactive user can interact with the object, even if data is not fully loaded loaded (data is fully loaded), loading data is loading uninitialized object does not have data


        </source>



        "readyState" Syntax and Note

        <source lang="javascript"> Note: Read-only property. The state of the element.

        Syntax:

        document.all.elementID.readyState


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |<title>