'queryCommandEnabled()' Example : queryCommandEnabled : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » queryCommandEnabled »

 

'queryCommandEnabled()' Example



    
<html>
<body>
<script language="JavaScript">
function function1() {
    var myText = document.selection.createRange();
    if (myText.queryCommandEnabled("Delete"== true) {
      document.execCommand("Delete");
    }

</script>
<p id="myText">Sample text to be selected and deleted.</p>
<input type="button" value="Delete selection" onclick="function1();">
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» queryCommandEnabled