$(function() { $(".word_break").each(function() { var word = $(this).text(); var step = 25;//步长 var len = word.length; if(len > step) { var newWord = new Array(); for(var i = step; i < len+step; i+=step) { newWord.push(word.substring(i-step,i)); newWord.push("<br>"); } $(this).html(newWord.join("")); } }); })