JavaScript Reference/Javascript Properties/outerText

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

"outerText" Example

   <source lang="javascript">
   

<html> <body>

Text Text Text Text .

<button id="myButton" onclick="function1();">Make Text Above Plain</button> <script language="javascript">

   function function1(){
       document.all.par.outerText = "Text Text Text."
       myButton.disabled = true;
   }

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


     </source>
   
  


"outerText" is applied to

   <source lang="javascript">

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

| |
|

| |
<button> |

| |
|

| | <comment> | | |<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> <map> | | |<marquee> <menu> | | |<nobr> <object> | | |

      | | |<plaintext>

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

        "outerText" Syntax and Note

        <source lang="javascript"> Note: Read and write property. Sets the element text .

        Syntax:

        document.all.elementID.outerText = value


        </source>

      <textarea> | | |<tfoot> | | |<thead>