doulangtiao4508 2013-01-31 09:10
浏览 92
已采纳

清除html编辑器的内容

i do have text-box and two check boxes which i am able to clear its values on button click:

$("#cleartext").live('click', function () {
        $(this).parents('form').find('input[type="text"]').val('');
        $(".check").attr("checked", false);
    });

but i do have a textarea in which i am using the html editor but i am not able to clear the value of it so please suggest me on this the view of this elements are as follows:

    <input type="text" id="title" name="title" required title="required" placeholder="title" data-bind="value:title" />
                            <input type="checkbox" id="active" name="active" class="check" data-bind="checked: active=='true'"  />Active
                            <input type="checkbox" id="logon" name="logon" class="check" data-bind="checked: use_logo=='true'"  />Logo
    <textarea id="iiii" name="iiii" class="htmleditor" rows="9" cols="50" style="width: 600px; height: 190px;"></textarea>
<button type="button" class="btn"  id="cleartext">New Contract</button>
  • 写回答

4条回答 默认 最新

  • dsfs64664 2013-01-31 09:37
    关注

    If I found correct plugin, below should work fine:

    $('#iiii').data("wysihtml5").editor.clear()
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作