当我将文本从 div 拖放到输入未触发DOMNodeRemoved
事件时。如何验证文本已被删除?
js:
$(function() {
$('.content').on('DOMNodeRemoved', function(event) {
console.log(event);
});
});
html:
<h2>Div content editable</h2>
<div class="content" contenteditable="true">
drop text to input
</div>
<h2>Input</h2>
<input class="input" type="text"/>
演示:jsbin