求助一个特别奇怪的HTML问题

njtucomputer 2007-05-10 07:04:12
我在JAVA里生成的HTML 字符串 很简单就是一个表格 然后显示出来
结果在一般分辨率下没问题 一到1280*1024 IE就会死 换到1024*768 就一点问题都没有

有问题的代码如下:
restr+="<table width=100% style='cursor:hand' floatRowGuids='" + floatRowGuid + "' zbnames='" + zbnames + "' class='" + errorClass + "' errorcolor='" + errorcolor + "' errorkind=1 onclick='errorItemClick(this)' onmouseover='errorItemMouseOver(this)' onmouseout='errorItemMouseOut(this)'>";
//restr+="<tr><td nowrap bgcolor='"+bgColor1+"' class=errortitle valign=middle>  "+ (i+1) + "  " + erronkindmessage + " ——   公式编号:   " + fei.getFmlNumber() + " </TD></TR>";
restr+="<tr><td nowrap height=30 bgcolor='"+bgColor2+"' class=errorcontent valign=middle>错误公式:" + WebStringOption.fixString(fei.getExperession()) + "<br>公式说明:" +fei.getErrorPrompt();
restr+="<br>错误数据:" + WebStringOption.fixString(fei.getErrorData());
restr+="<br>所在报表:" + title;
restr+="</TD></TR>";
restr+="</table>";

不好意思 可能复制过来有点乱 就是restr字符串显示在页面中 经过排查 如果注释调一行TR 就是上面我注释的那一行 就可以显示出来 不注释那行 就会死 我都晕死了 怎么会这样 各位帮帮忙 帮我分析一下可能原因 多谢了!
...全文
213 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
easyroom 2007-10-26
  • 打赏
  • 举报
回复
看出来了你那一行语法不对 ,字符串里面的双引号要转义.写成\"


restr+=" <table width=100% style= "cursor:hand " floatRowGuids= "" + floatRowGuid + " " zbnames= "" + zbnames + " " class= "" + errorClass + " " errorcolor= "" + errorcolor + " " errorkind=1 onclick= "errorItemClick(this) " onmouseover= "errorItemMouseOver(this) " onmouseout= "errorItemMouseOut(this) " >";
restr+=" <tr > <td nowrap bgcolor= \""+bgColor1+"\" class=\"errortitle\" valign=\"middle\" >  "+ (i+1) + "  " + erronkindmessage + " ——   公式编号:   " + fei.getFmlNumber() + " </TD > </TR >";
restr+=" <tr > <td nowrap height=30 bgcolor= ""+bgColor2+" " class=errorcontent valign=middle >错误公式:" + WebStringOption.fixString(fei.getExperession()) + " <br >公式说明:" +fei.getErrorPrompt();
restr+=" <br >错误数据:" + WebStringOption.fixString(fei.getErrorData());
restr+=" <br >所在报表:" + title;
restr+=" </TD > </TR >";
restr+=" </table >";

easyroom 2007-10-26
  • 打赏
  • 举报
回复
restr+=" <table   width=100%   style= "cursor:hand "   floatRowGuids= ""   +   floatRowGuid   +   " "   zbnames= ""   +   zbnames   +   " "   class= ""   +   errorClass   +   " "   errorcolor= ""   +   errorcolor   +   " "   errorkind=1   onclick= "errorItemClick(this) "   onmouseover= "errorItemMouseOver(this) "   onmouseout= "errorItemMouseOut(this) " >"; 
//restr+=" <tr > <td nowrap bgcolor= ""+bgColor1+" " class=errortitle valign=middle >  "+ (i+1) + "  " + erronkindmessage + " ——   公式编号:   " + fei.getFmlNumber() + " </TD > </TR >";
restr+=" <tr > <td nowrap height=30 bgcolor= ""+bgColor2+" " class=errorcontent valign=middle >错误公式:" + WebStringOption.fixString(fei.getExperession()) + " <br >公式说明:" +fei.getErrorPrompt();
restr+=" <br >错误数据:" + WebStringOption.fixString(fei.getErrorData());
restr+=" <br >所在报表:" + title;
restr+=" </TD > </TR >";
restr+=" </table >";
easyroom 2007-10-26
  • 打赏
  • 举报
回复
java 还是JAVASCRIPT
restr+=" <table   width=100%   style= "cursor:hand "   floatRowGuids= ""   +   floatRowGuid   +   " "   zbnames= ""   +   zbnames   +   " "   class= ""   +   errorClass   +   " "   errorcolor= ""   +   errorcolor   +   " "   errorkind=1   onclick= "errorItemClick(this) "   onmouseover= "errorItemMouseOver(this) "   onmouseout= "errorItemMouseOut(this) " >"; 
//restr+=" <tr > <td nowrap bgcolor= ""+bgColor1+" " class=errortitle valign=middle >  "+ (i+1) + "  " + erronkindmessage + " ——   公式编号:   " + fei.getFmlNumber() + " </TD > </TR >";
restr+=" <tr > <td nowrap height=30 bgcolor= ""+bgColor2+" " class=errorcontent valign=middle >错误公式:" + WebStringOption.fixString(fei.getExperession()) + " <br >公式说明:" +fei.getErrorPrompt();
restr+=" <br >错误数据:" + WebStringOption.fixString(fei.getErrorData());
restr+=" <br >所在报表:" + title;
restr+=" </TD > </TR >";
restr+=" </table >";
ImN1 2007-05-10
  • 打赏
  • 举报
回复
不要把java贴出来,很多变量都不清楚,把1024下的ie html输出贴出来

61,124

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧