JavaScript Reference/Javascript Collections/namespaces
Версия от 18:30, 25 мая 2010; (обсуждение)
Содержание
"namespaces" Example
<html xmlns:namespace1 xmlns:namespace2>
<button onclick="alert(document.namespaces.length);">Number of namespaces on the page</button>
</body>
</html>
"namespaces" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |document |
+----------------+--------------------------------------------------------------+
"namespaces" JavaScript properties and JavaScript methods
JavaScript properties and JavaScript methods
add(), item(), length
"namespaces" Syntax Parameters and Note
Note:
Returns an array of all the namespace objects in the document.
Syntax:
document.namespaces // returns all namespaces
document.namespaces(param1) // returns an individual namespace
Parameters:
param1 Required; the zero-based index