JavaScript Reference/Javascript Collections/anchors — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
Содержание
"anchors" Example
<html>
<body>
<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>
"anchors" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |document |
+----------------+--------------------------------------------------------------+
"anchors" JavaScript properties and JavaScript methods
JavaScript properties and JavaScript methods
item(), length, namedItem(), tags(), urns()
"anchors" Syntax Parameters and Note
Note:
Returns an array of all <a> elements in the document.
Syntax:
document.anchors // returns all anchors
document.anchors(param1, param2) // returns an individual anchor
param1 Required; zero-based index or
desired member"s id or name attribute.
param2 Optional; zero-based index for the result returned
if param1 matches more than one element.