JavaScript Reference/Javascript Collections/namespaces
Содержание
"namespaces" Example
<source lang="javascript">
<html xmlns:namespace1 xmlns:namespace2> <button onclick="alert(document.namespaces.length);">Number of namespaces on the page</button> </body> </html>
</source>
"namespaces" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+
</source>
"namespaces" JavaScript properties and JavaScript methods
<source lang="javascript">
JavaScript properties and JavaScript methods
add(), item(), length
</source>
"namespaces" Syntax Parameters and Note
<source lang="javascript">
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 </source>