JavaScript DHTML/Node Operation/pathname

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

"pathname" Example

   <source lang="html4strict">
   

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

   function function1() {
      alert(document.getElementById("myLink").pathname);
   }

</script> <a id="myLink" href="http://www.wbex.ru" target="_blank">wbex.ru home page</a> <input type="Button" id="myB" value="File and path to the page" onClick="function1();"> </body> </html>


     </source>