I:
IE:
Word-wrap: Break-word;
Word-break: Break-all;
Firefox:
JS Control
<Div id = "FF" style = "word-break: Break-all; </div>
<SCRIPT type = "text/JavaScript">
// <! [CDATA [
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 (120)
//]>
</SCRIPT>
II:
IE, Firefox:
<Style type = "text/CSS">
. Wordwrap
{
Word-wrap: Break-word;
Word-break: Break-all;
-Moz-binding: URL ('./wordwrap. xml # wordwrap ');
Overflow: hidden;
}
</Style>
There is a wordwrap. xml file. The content of this file is as follows:
<? XML version = "1.0" encoding = "UTF-8"?>
<Bindings xmlns = "http://www.mozilla.org/xbl" xmlns: html = "http://www.w3.org/1999/xhtml">
<Binding id = "wordwrap" applyauthorstyles = "false">
<Implementation>
<Constructor>
// <! [CDATA [
VaR ELEM = this;
ELEM. addeventlistener ('overflow ',
Function ()
{
VaR exp =/<& #8203; \/* [& #8203; _ \ s = "'\ W] +>/g;
VaR TXT = ELEM. innerhtml;
VaR chars = TXT. Split ('');
VaR newtxt = chars. Join ('& #8203 ;');
Newtxt = newtxt. Replace (exp, reconstructtag );
ELEM. innerhtml = newtxt;
}, False );
Function reconstructtag (_ Tag)
{
Return _ Tag. Replace (/& #8203;/g ,'');
}
//]>
</Constructor>
</Implementation>
</Binding>
</Bindings>
<! -- Web2 -->