当我将文本从div拖放到input时,没有触发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
1条答案
按热度按时间2ekbmq321#
不确定是你要找的:
http://jsbin.com/izorij/5/edit