大致如下 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; }
大致如下