Javascript examples for DOM:Element contentEditable
Element contentEditable Property - Find out if a <p> element is editable or not:
<!DOCTYPE html> <html> <body> <p id="myP" contenteditable="true">Click the button to find out if I am editable.</p> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w .j a v a 2s . c om*/ var x = document.getElementById("myP").contentEditable; document.getElementById("demo").innerHTML = x ; } </script> </body> </html>