Javascript DOM HTML Document designMode Property get

Introduction

Return the designMode of the current document:

var x = document.designMode;

The designMode property sets, or returns, whether the document is editable or not.

Click the button to see get the value of the designMode property:

View in separate window

<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">Get the designMode</button>

<p id="demo"></p>

<script>
function myFunction() {/* ww w.ja v a  2 s .co  m*/
  var x = document.designMode;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>



PreviousNext

Related