JavaScript Tutorial/Document/links — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:24, 26 мая 2010
Содержание
Change links
<source lang="javascript">
<html> <head> <title>Link Modifier</title> </head> <body>
Link Modifier
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<script language="javascript" type="text/javascript">
</script> </body> </html></source>
document.links
Syntax
<source lang="javascript">
document.links
document.links[index]</source>
document.links.length
The length property contains the number of Link objects that are in the document.links array.
<source lang="javascript">
<html>
<a href="http://www.wbex.ru">B Page</a>
<a href="http://www.wbex.ru">A Page</a>
<script language="JavaScript"> </script> </html></source>
Get all links on a page
<source lang="javascript">
<html> <head> <title>Get all links on a page</title> </head> <body>
Get all links on a page
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<a href="http://www.wbex.ru/">Example</a>
<script language="javascript" type="text/javascript">
</script> </body> </html></source>