这段时间以来一直在做Abriza的项目,已经好久没有写博客了.
在做项目中的upload和download功能的时候,发现一个奇怪的问题:在ie中换行符解析出来与在firefox中解析出来是不一样的.
在ie中解析出来的换行符是"<BR>",所以前段设置的时候<br>一直无效.
但是在firefox中解析出来确是"<br>".
所以感觉还是蛮有趣的.
最后修改了if语句,布局不再发生变化.问题解决了...
ps:感谢milo,哈哈.....
if (html != "") {
if (html.substring(html.length - 4) == "<BR>" || html.substring(html.length - 4) == "<br>") {
html = html.substring(0, html.length - 8);
}
html = html + "<br/>";
}
jack.li
2011.12.29.pm
From Abriza project
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.