zl程序教程

您现在的位置是:首页 >  后端

当前栏目

layui.laytpl中js方法书写及调用:去除html标签

JS方法HTML 调用 标签 去除 layui 书写
2023-09-11 14:16:15 时间
 1 <script type="text/html" id="conTpl">
 2  
 3     {{# 
 4         var delhtml = function(str) {
 5             return str.replace(/&lt;[^>].*?&gt;/g, '');
 6         }
 7     }}
 8     
 9     {{delhtml(d.contant)}}
10    
11 </script>