To provide you with three code to force line-breaking code Oh, a CSS tutorial forced to change lines, two is a Web page special effects forced to change lines
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;
CSS Force wrap
Forced Wrap: Word-break:break-all;white-space:normal;word-wrap:break-word; (table preferably plus table-layout:fixed;) JS code
<script>
function Tobreakword (Intlen) {
var Obj=document.getelementbyid ("FF");
var strcontent=obj.innerhtml;
var strtemp= "";
while (Strcontent.length>intlen) {
Strtemp+=strcontent.substr (0,intlen) + "
";
Strcontent=strcontent.substr (intlen,strcontent.length);
}
strtemp+= "
"+strcontent;
Obj.innerhtml=strtemp;
}
if (document.getElementById &&!document.all) Tobreakword (37)
</script>