动态增加table的行时,为什么行与行之间的距离会变粗?
代码如下:
<script type= "text/javascript ">
function getRowName(rowNum){
switch (rowNum){
case 1:return "AREA ";
case 2:return "CITY ";
case 3:return "POWERCUTLINE ";
case 4:return "POWERCUTCOUNTRYSIDE ";
case 5:return "POWERCUTTOWN ";
case 6:return "POWERCUTVILLAGE ";
case 7:return "POWERCOUNTRYSIDE ";
case 8:return "POWERTOWN ";
case 9:return "POWERVILLAGE ";
case 10:return "RECOVERREMARK ";
}
}
function sum(rowNum,curLineNum){
var s = 0;
var rowName = getRowName(rowNum);
//alert( "rowName: "+rowName);
for(i = 1; i <= curLineNum; i++){
elmentId =rowName+ " "+i+ " "+rowNum;
// alert(elmentId);
if($(elmentId).value != " "){
// alert( "POWERCUTLINE "+i+ " "+rowNum);
s = s + parseInt($(elmentId).value);
}
}
return s;
}
function calcaute(rowNum){
$( "total "+rowNum).value = sum(rowNum,$( "curLineNum ").value);
}
</script>
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> dd </title>
<style type= "text/css ">
body {
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
font-size: 9pt;
}
table {
font-size: 9pt;
text-align: center;
width:600px;
}
table tr {
height:25px;
}
table td input {
margin: 0px;
padding: 0px;
height: 100%;
width: 100%;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
}
</style>
<body>
<table id= "mainTable " border= "0 " cellpadding= "0 " cellspacing= "1 "
bgcolor= "#316AC5 " align= "center ">
<tr bgcolor= "#FFFFFF ">
<td colspan= "10 ">
<strong> afsadfs
</td>
</tr>
<tr bgcolor= "#FFFFFF ">