這段時間因為公司限制域賬戶登錄,在win7下無法上網,就切換到xp系統了,逐漸開始用office2007來發blog,還好基本上我在2010中用到的功能2007都有。
今天在動態生成htm文件時發現自己以前的htm相關知識都忘了,所以要邊用邊搜索,順便總結下。
因為用table顯示查詢統計的表格,所以必須要讓table中空的單元格可以顯示出邊框來,嘗試過有兩種方法:1.<td></td>中間加上 ,注意不能是直接空格,必須用 才可以;2.在table屬性中加入frame="border"。 表格邊框的顯示與隱藏,是可以用frame參數來控制的。請注意它只控制表格的邊框圖,而不影晌單元格。
只顯示上邊框 <table frame=above><br>
只顯示下邊框 <table frame=below> <br>
只顯示左、右邊框 <table frame=vsides><br>
只顯示上、下邊框 <table frame=hsides><br>
只顯示左邊框 <table frame=lhs><br>
只顯示右邊框 <table frame=rhs><br>
不顯示任何邊框 <table frame=void></td>
<table>標簽的屬性設置 |
||||||||||
帶邊框的表格: |
|
|||||||||
不帶邊框的表格: |
|
|||||||||
邊框尺寸設置: <table border=#> #=邊框粗度 <table border=10> <tr><th>Food</th><th>Drink</th><th>Sweet</th> <tr><td>A</td><td>B</td><td>C</td> </table> |
|
|||||||||
<table border width=# height=#>width:寬度,height:高度,#=象素 |
|
|||||||||
<table border cellspacing=#> #=象素 表元間隙設置: |
|
|||||||||
<table border cellpadding=#> #=象素 |
|
|||||||||
<table align=#> #=left,right,center 設置表格在網頁中的布局位置: <table align="left" border> <tr><th>Food</th><th>Drink</th><th>Sweet</th> <tr><td>A</td><td>B</td><td>C</td> </table> My favorites...<br> cookies, chocolates, and more. |
My favorites... |
|||||||||
表格的標題 <table border> <caption align=center>Lunch</caption> <tr><th>Food</th><th>Drink</th><th>Sweet</th> <tr><td>A</td><td>B</td><td>C</td> </table> |
|
|||||||||
表格邊框的色彩 <table cellspacing=5 border=5 bodercolor=#ffaa00> <tr><th>Food</th><th>Drink</th><th>Sweet</th> <tr><td>A</td><td>B</td><td>C</td> </table> |
|
|||||||||
表格邊框色彩的亮度控制 <table bordercolorlight=blue bordercolordark=Maroon> <tr><th>Food</th><th>Drink</th><th>Sweet</th> <tr><td>A</td><td>B</td><td>C</td> </table> |
|
注意htm中的顏色只能用#RRGGBB表示,比如說黑色就是#000000,而不能像delphi中那樣寫成clBlack(可能沒有定義宏常量的原因)。