求一段處理Table的JavaScript代碼。
在WEB面頁,我自動產生了一個Table,結構如下:
<table id= "tbDetail " border= "0 ">
<tr style= "BACKGROUND-COLOR:aqua ">
<td> Description </td>
<td> Unit Price </td>
<td> Michael Nien </td>
<td> Shawn Shih </td>
<td> Scott Kao </td>
<td> Pei-Yee Lee </td>
<td> Sanford Tang </td>
<td> Binh Nugyen </td>
<td> Total Qty </td>
</tr>
<tr style= "BORDER-LEFT-COLOR:burlywood;BORDER-BOTTOM-COLOR:burlywood;BORDER-TOP-COLOR:burlywood;BACKGROUND-COLOR:azure;BORDER-RIGHT-COLOR:burlywood ">
<td> <span> Pen </span> </td>
<td> <span> 0.500 </span> </td>
<td> <input type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl3 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl4 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl5 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl6 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl7 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <span> 0 </span> </td>
</tr>
<tr style= "BORDER-LEFT-COLOR:burlywood;BORDER-BOTTOM-COLOR:burlywood;BORDER-TOP-COLOR:burlywood;BACKGROUND-COLOR:azure;BORDER-RIGHT-COLOR:burlywood ">
<td> <span> Pencil </span> </td>
<td> <span> 0.250 </span> </td>
<td> <input name= "_ctl11 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl12 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl13 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl14 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl15 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <input name= "_ctl16 " type= "text " value= "0 " style= "WIDTH:50px "> </td>
<td> <span> 0 </span> </td>
</tr>
<tr style= "BORDER-LEFT-COLOR:burlywood;BORDER-BOTTOM-COLOR:burlywood;BORDER-TOP-COLOR:burlywood;BACKGROUND-COLOR:azure;BORDER-RIGHT-COLOR:burlywood ">
<td> <span> CD </span> </td>
<td> <span> 1.000 </span> </td>
<td> <input name= "_ctl20 " type= "text " value= "0 " style= "WIDTH:50px "> </td>