'expando' Example : expando « Javascript Properties « JavaScript Reference

Home
JavaScript Reference
1.Event Handlers Reference
2.Javascript Collections
3.Javascript Methods
4.Javascript Objects
5.Javascript Properties
JavaScript Reference » Javascript Properties » expando 




'expando' Example

    
<html>
<body>
<p id="myElement">Sample text, try to select part of it</p>
<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>

    
      
      














Related examples in the same category
1.'expando' Syntax and Note
2.'expando' Possible Values
3.'expando' is applied to
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.