JavaScript Reference/Javascript Properties/expando
Содержание
"expando" Example
<source lang="javascript">
<html> <body>
Sample text, try to select part of it
<script language="JavaScript"> function function1() {
myElement.setAttribute("unselectable", "off", 0); document.expando = true;
} function function2() {
myElement.setAttribute("unselectable", "on", 0); document.expando = true;
} </script> <button onclick="function2();">Unselectable</button> <button onclick="function1();">Selectable</button> </body> </html>
</source>
"expando" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |attribute (IE6 only) document | +----------------+--------------------------------------------------------------+
</source>
"expando" Possible Values
<source lang="javascript">
Possible Values true (the default) false.
</source>
"expando" Syntax and Note
<source lang="javascript">
Note: Read and write property. Can custom properties be added to object.
Syntax:
objectName.expando = value The following example illustrates how to create a custom counter property: document.expando = true; // instruct the browser to "expand" the properties array document.counter = 0; // introduce a new property
</source>