解决数字不能换行问题

function toBreakWord(intLen, id){
     var obj=document.getElementById(id);
     var strContent=obj.innerHTML; 
     var strTemp="";
     while(strContent.length>intLen){   
     strTemp+=strContent.substr(0,intLen)+"<br>";    
     strContent=strContent.substr(intLen,strContent.length); }
     strTemp+= strContent;obj.innerHTML=strTemp;
}

.br{word-break:break-all;word-warp:break-word;background-color:#eee;}

FF3.6以上版本使用样式解决.

原文地址:https://www.cnblogs.com/terrylin/p/1795531.html