JavaScript DHTML/Javascript Collections/anchors

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

"anchors" Example

   <source lang="html4strict">
   

<html> <body> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <a href="http://www.wbex.ru/" id="wbex">www.wbex.ru</a> <input type="button"

      value="Retrieve the number of anchors in this document" 
      onclick="alert(document.anchors.length);">

</body> </html>


     </source>