猿问
回到首页
个人中心
反馈问题
注册登录
下载APP
首页
课程
实战
体系课
手记
专栏
慕课教程
js文章段落加<p>
用户上传了一篇文章,怎么进行分段,就是加<p>标签。
绝地无双
浏览 795
回答 1
1回答
慕尼黑的夜晚无繁华
function add_p(get_cont){var get_cont = get_cont.trim;var count = '<p>' + get_cont + '</p>';count_str = count.replace(/\s+/g,'</p><p>');return count_str;}
0
0
0
打开App,查看更多内容
随时随地看视频
慕课网APP
相关分类
JavaScript
继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续