JavaScript Reference/Javascript Properties/ownerDocument

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

"ownerDocument" Example

   <source lang="javascript">
   

<html> <body>

This is a sample text.


<input type="button" value="ownerDocument" onclick="function1();"> <script language="JavaScript">

   function function1() {
       alert(document.all.myP.ownerDocument);
   }

</script> </body> </html>


     </source>
   
  


"ownerDocument" is applied to

   <source lang="javascript">

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

| |
|

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

| |
|

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

| | | <dir> |

| |
|

| |

| | |<embed> <fieldset> | | | <form> | | |<frame> <frameset> | | |<head> <hn> |

| |
<html> |

| | <iframe> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<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> <meta> | | |<noframes> <noscript> | | |<object>
      | | |<optgroup> <option> | | |

      <param> | | |

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

        "ownerDocument" Syntax and Note

        <source lang="javascript"> Note: Read-only property. Returns an owner.

        Syntax:

        document.getElementById("elementID").ownerDocument document.all.elementID.ownerDocument // IE only


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |<title>