| 发表于:2007-10-18 15:50:38 楼主 |
结构是jsp sevlert bean 下面的代码是jsp中的~ <tr > <td width="35" align="center" > <font size=3 > 序号 </font > </td > <td width="150" align="center" > <font size=3 > 会议名称 </font > </td > <td align="center" width="120" > <font size=3 > 会议时间 </font > </td > <td align="center" width="200" > <font size=3 > 人员 </font > </td > <td align="center" width="93" > <font size=3 > 提示时间 </font > </td > </tr > <% if (result!=null){ length = result.size(); for (int i=length-1;i> =0;i--){ hashtable record = (hashtable)result.get(i); %> <tr > <% string color = " <font size=2 > "; if (record.get("warningstate").equals("warning")){ color = " <font size=2 color=#0000ff > "; } % > <td width="35" > <%=color% > <%=record.get("id")% > </td > <td width="150" > <%=color% > <font size=2 > <%=record.get("conference_name")% > </font > </td > <td width="120" > <%=color% > 从 <%=record.get("conference_begindate")% > <%=color% > 到 <%=record.get("conference_enddate")% > </td > <td width="200" > <%=color% > <font size=2 > <%=record.get("conference_lead")% > </font > <br > <font size=2 > <%=record.get("conference_person")% > </font > </td > <td width="93" align="center" > <%=color% > <font size=2 > <%=record.get("lefttime") % > 天 </font > </td > <% } } % > </tr > 我现在想做的就是,在蓝色的部分的判断处if (result!=null)中获取lefttime的值并做判断。 想法如下: <% if (result!=null && <%=record.get("lefttime") % > > 1){ length = result.size(); for (int i=length-1;i > =0;i--){ hashtable <string, string > record = (hashtable <string, string > )result.get(i); % > 但是不行,总是有小红叉叉,我的想法就是获取lefttime的值,并且把lefttime强制转化为整形,并做判断让它大约1 bean都有对应的存入的数据~ |
|
|
|
|