'expando' Example : document : Javascript Objects JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Javascript Objects » document »

 

'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>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Javascript Objects
» document