页:
[1]
| balticbreeze | 2004-6-5 11:12 AM |
|
请帮忙看一下这个表格,急用,在线等...
这个表格最后一栏“百分比”的后面几个格无法显示,请帮忙看看哪里出了错。还有TR TD里的ID是什么意思?
<html>
<head>
<title>diagram</title>
<script language = "JavaScript">
ns4 = (document.layers) //? true : false;
ie4 = (document.all) //? true : false;
function pushbutton() {
if(event.keyCode==13){
window.open("","DisplayWindow","width=550,height=450,left=100,top=30,scrolling=no,help=no") ;
}
}
function dele(obj){
row = test.deleteRow(obj.parentNode.parentNode.rowIndex);
for(i=1;i<=test.rows.length - 1;i++)
{
test.rows[i].cells[0].innerHTML='<center>'+i.toString()+'<center>';
}
}
function insert(obj){
if(obj.parentNode.parentNode.rowIndex != test.rows.length - 1)return;
if(event.keyCode==13){
row = test.insertRow();
row.insertCell().innerHTML = '<center>'+row.rowIndex.toString()+'</center>';
row.insertCell().innerHTML = '<INPUT id = INPUT2 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown= "pushbutton()">'
row.insertCell().innerHTML = '<INPUT id = INPUT3 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown= "pushbutton()" >'
}
}
</script>
</head>
<body bgColor = white PSPARAMS="">
<P>
<table onactivate="" id = test style = "BORDER-TOP-WIDTH:thin;BORDER-LEFT-WIDTH:thin;BORDER-BOTTOM-WIDTH: thin;MARGIN:Opx;WIDTH:533px;HEIGHT:66px;BORDER-RIGHT-WIDTH:thin "border = 1>
<TBODY id= TBODY2><FONT size =4><CENTER>Table</CENTER></FONT>
<TR id = TR2>
<TH id = td6>
<STRONG>成绩</STRONG>
<TH id = td7>
<STRONG>人数</STRONG>
<TH id = td8>
<STRONG>百分比</STRONG>
</th>
</th>
</tr>
<tr id = tr3>
<TD id = td12><CENTER>5分</CENTER></TD>
<TD id = td13 style="MARGIN:Opx">
<INPUT id = INPUT2 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown = "pushbutton()" >
</TD>
<TD id = td13 style="MARGIN:Opx">
<INPUT id = INPUT3 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown = "pushbutton()" >
</TD>
</TR>
<tr id = tr4>
<td id = td13><center>4分</center></td>
<INPUT id = INPUT2 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown = "pushbutton()" >
</TD>
<TD id = td13 style="MARGIN:Opx">
<INPUT id = INPUT3 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown= "pushbutton()" >
</TD>
</tr>
<tr id = tr5>
<td id = td13><center>3分</center></td>
<INPUT id = INPUT2 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown = "pushbutton()" >
</TD>
<TD id = td13 style="MARGIN:Opx">
<INPUT id = INPUT3 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown= "pushbutton()" >
</TD>
</tr>
<tr id = tr6>
<td id = td13><center>2分</center></td>
<INPUT id = INPUT2 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown = "pushbutton()" >
</TD>
<TD id = td13 style="MARGIN:Opx">
<INPUT id = INPUT3 style="MARGIN: Opx; WIDTH: 100%; BORDER-TOP-STYLE:none; BORDER-RIGHT-STYLE:none; BORDER-LEFT-STYLE:none;HEIGHT:100%; BORDER-BOTTOM-STYLE:none" onkeydown= "pushbutton()" >
</TD>
</tr>
</TBODY>
</TABLE>
<FORM method = post>
</form>
</body> |
Powered by Discuz! Archiver 6.1.0
© 2001-2006 Comsenz Inc.
Processed in 0.005945 second(s), 2 queries |