'contentEditable' Example : Content Editable : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » Content Editable »

 

'contentEditable' Example



    
<html>
<body>
<script language="JavaScript">
function function1() {
    document.getElementById("myP").innerText = "contentEditable is true.";
    document.getElementById("myP").contentEditable = "true"]
}
function function2() {
    document.getElementById("myP").innerText = "Try again.";
    document.getElementById("myP").contentEditable = "false"

function function3(){
    alert(document.getElementById("myP").isContentEditable);
}
</script>
<p id="myP">Try to edit this text by overwriting any part of it.</p>
<button onclick="function1();">Make the text editable</button>
<button onclick="function2();">Make the text non-editable</button>
<button onclick="function3();">isContentEditable</button>
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» Content Editable