JavaScript Reference/Javascript Properties/nameProp

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

"nameProp" Example

   <source lang="javascript">
   

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

   function function1() {
       alert(document.getElementById("myA").nameProp);
   }

</script> <a id="myA" href="http://www.wbex.ru/" target=_blank>wbex.ru Home Page</a> <button onclick="function1();">wbex.ru Home Page nameProp</button> </body> </html>


     </source>
   
  


"nameProp" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <img> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"nameProp" Syntax and Note

   <source lang="javascript">

Note: Read-only property. The file name specified in the href or src property.

Syntax:

document.all.elementID.nameProp


     </source>