<div contenteditable class="con" @input="onDivInput($event,fd)"></div>
onDivInput: function(e) {
this.myHtmlCode = e.target.innerHTML;
console.log("Text: %o", this.myHtmlCode);
},
- $event事件回调
<div contenteditable class="con" @input="onDivInput($event,fd)"></div>
onDivInput: function(e) {
this.myHtmlCode = e.target.innerHTML;
console.log("Text: %o", this.myHtmlCode);
},
本文标题:DIV模拟输入框
本文链接:https://www.haomeiwen.com/subject/cbzjuhtx.html
网友评论