JavaScript Reference/Javascript Objects/namespace

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

"namespace" Event handlers

+----------------+--------------------------------------------------------------+
| Applied_To     |onReadyStateChange                                            |
+----------------+--------------------------------------------------------------+



"namespace" Example

    
<html xmlns:namespace1 xmlns:namespace2>
<button onclick="alert(document.namespaces(0).name);">
Name of first namespace on the page
</button>
</body>
</html>



"namespace" is applied to

Names noted with an asterisk (*) are JavaScript properties only.
+----------------+--------------------------------------------------------------+
| Applied_To     |namespaces*                                                   |
+----------------+--------------------------------------------------------------+



"namespace" JavaScript Methods

+----------------+--------------------------------------------------------------+
| JavaScript     |attachEvent                     detachEvent                   |
| Methods        |doImport                                                      |
+----------------+--------------------------------------------------------------+



"namespace" JavaScript Properties

+----------------+--------------------------------------------------------------+
| JavaScript     |name                            readyState                    |
| Properties     |urn                                                           |
+----------------+--------------------------------------------------------------+



"namespace" Syntax and Note

Note:
Embed an element"s behavior into the document. 
You can only access the namespace object by referencing the desired index in the 
namespaces collection.
    
Syntax:
    
document.namespaces(index).memberName