在CONTENTEDITABLE DIV清空内容 [英] Empty contents in contenteditable div
本文介绍了在CONTENTEDITABLE DIV清空内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个CONTENTEDITABLE股利,作为一个textarea:
< DIV CLASS =邮报占位符=写评论...CONTENTEDITABLE =真正的>< / DIV>
我哪有空通过JS / JQuery的股利,这样很明显的所有值?
我已经试过$ <$ C C $> HTML()(后); ,但它不能正常工作
请帮忙。
解决方案
$(后)空()。
I have a contenteditable div that acts as a textarea:
<div class="post" placeholder="Write a comment..." contenteditable="true"></div>
How can I empty the div through JS/JQuery so that it's clear of all values?
I've tried $(".post").html("");
but it doesn't work properly.
Please help.
解决方案
$(".post").empty();
这篇关于在CONTENTEDITABLE DIV清空内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文