@import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
1、表格中的內容過長時,不換行,顯示省略號并Tooltip。
1
<table width="200px" style="border:1px solid #000000;table-layout:fixed;word-wrap:break-word;word-break:break-all;">
2
<tr>
3
<td style="font-size: 11px;text-overflow:ellipsis;overflow:hidden;white-space: nowrap;">
4
dfasdfdsf sdfsaf sdfdsfs dfsaf sdfds fsdfsaf sdfds fsdfsaf sdfd sfsdfsaf</td>
5
</tr>
6
</table>
注意,表格的樣式應設置如下內容:
table-layout:fixed;word-wrap:break-word;word-break:break-all;
TD則應設置如下樣式:
text-overflow:ellipsis;overflow:hidden;white-space: nowrap;
當然,你可以把這些樣式放到樣式表里面去。
2、在HTML頁面中顯示分數,可用如下格式:
½
¾
⅓
3、使response中顯示的文件名是中文的,可以這樣:
res.setContentType("application/vnd.ms-excel");
res.setHeader("Content-Disposition", "attachment;filename="
+ new String(targetFileName.getBytes("big5"), "ISO_8859_1"));
attachment可以改為inline,這樣就會直接顯示在頁面上,而不是下載方式。
如果不寫第二句,也會直接顯示在頁面上。
posted on 2006-08-18 16:40
Robin's Programming World 閱讀(1374)
評論(1) 編輯 收藏 所屬分類:
Java