contentEditable是html中的一个属性。设置html的contentEditable=‘true’时,即可开启该元素的编辑模式。 <p contenteditable = "true">这是一段可以编辑的文字</p>