猿问
js文章段落加<p>
用户上传了一篇文章,怎么进行分段,就是加<p>标签。
绝地无双
浏览 807
回答 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
相关分类
JavaScript
我要回答