How to determine whether the current element node editable

Use: Element.prototype.isContentEditable , you can determine whether an element node can be edited.

document.body.isContentEditable;
// false

 

note: 

1. Element.prototype.isContentEditable read-only; the true / false / inherit

2. Element.prototype.contentEditable can read and write, have true / false / inherit

 

Guess you like

Origin www.cnblogs.com/aisowe/p/11550246.html