layui 富文本赋值: !DOCTYPE htmlhtmlheadmeta http-equiv="Content-Type" content="text/html; charset=utf-8" / titlelayui/titlemeta name="renderer" content="webkit"meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"meta name="vi
layui 富文本赋值:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>layui</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link rel="stylesheet" href="/Public/lib/layui/css/layui.css" rel="external nofollow" media="all"> </head> <body> <textarea id="demo" style="display: none;"></textarea> <script src="/Public/lib/jquery.min.js"></script> <script src="/Public/lib/layui/layui.js"></script> <script> layui.use(['layedit'], function(){ var layedit=layui.layedit; var index=layedit.build('demo'); //建立编辑器 layedit.setContent(index,"你好"); }); </script> </body> </html>
layui 富文本取值:
layedit.getContent(editIndex);//取整个值 layedit.getText(editIndex);//取纯文本值
以上这篇layui 富文本赋值,取值,取纯文本值的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持易盾网络。