k*o 发帖数: 46 | 1 我想动态输出一个表格
+--------------------------------+
| month | click cnt | visitor cnt|
+--------------------------------|
| Jan | 1180 | 200 |
...
...
+--------------------------------|
| Dec | 1030 | 160 |
+--------------------------------+
这里月份,click cnt, visitor cnt都是动态的。
是调用Bean的函数算出来的。
JSP是可以打印HTML语句的。
有没有可能在Bean里面直接打印HTML的语句呢?
多谢。 |
c*y 发帖数: 137 | 2
Generally, you don't want to do that bah. That's not why you use Bean. Let
bean do the processing and leave the formatting/displaying to HTML/JSP
【在 k*o 的大作中提到】 : 我想动态输出一个表格 : +--------------------------------+ : | month | click cnt | visitor cnt| : +--------------------------------| : | Jan | 1180 | 200 | : ... : ... : +--------------------------------| : | Dec | 1030 | 160 | : +--------------------------------+
|
e***g 发帖数: 158 | 3 or if he has too, just return "..."+cnt+"..."
【在 c*y 的大作中提到】 : : Generally, you don't want to do that bah. That's not why you use Bean. Let : bean do the processing and leave the formatting/displaying to HTML/JSP
|
|
|
|
|