JavaScript Reference/Javascript Properties/readyState
Версия от 18:30, 25 мая 2010; (обсуждение)
Содержание
"readyState" Example
<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>
"readyState" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <acronym> |
| |<address> <applet> |
| |<area> <b> |
| |<base> <basefont> |
| |<bdo> <bgsound> |
| |<big> <blockquote> |
| |<body> <br> |
| |<button> <caption> |
| |<center> <cite> |
| |<code> <col> |
| |<colgroup> <comment> |
| |<custom> <dd> |
| |<del> <dfn> |
| |<dir> <div> |
| |<dl> document |
| |<dt> <em> |
| |<embed> <fieldset> |
| |<font> <form> |
| |<frame> <frameset> |
| |<head> <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"> <ins> |
| |<isindex> <kbd> |
| |<label> <legend> |
| |<li> <link> |
| |<listing> <map> |
| |<marquee> <menu> |
| |namespace <nobr> |
| |<noframes> <noscript> |
| |<object> <ol> |
| |<option> <p> |
| |<plaintext> <pre> |
| |<q> <rt> |
| |<ruby> <s> |
| |<samp> <script> |
| |<select> <small> |
| |<span> <strike> |
| |<strong> <sub> |
| |<sup> <table> |
| |<tbody> <td> |
| |<textarea> <tfoot> |
| |<th> <thead> |
| |<title> <tr> |
| |<tt> <u> |
| |<ul> <var> |
| |<xml> <xmp> |
+----------------+--------------------------------------------------------------+
"readyState" Possible Values
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
"readyState" Syntax and Note
Note:
Read-only property.
The state of the element.
Syntax:
document.all.elementID.readyState