<form action="9.php" method=post>
<table width="100%" border="1" id=otable>
  <tr> 
    <td><div align="center">科研工作项目</div></td>

  </tr>
  <tr> 
    <td><INPUT type=text name=ItemSub size=10></td>
  </tr>
</table>
<input type=button name=b1 value=del onclick=del()>
<input type=button name=b1 value=add onclick=add()><script language=javascript>
<!--
function del()
{
   otable.deleteRow(1);   
  
}function add()
{ var madd=otable.rows.length;
//alert(madd);
  if(madd<=5){
  var orow1=otable.insertRow(otable.rows.length);
  
  //insert one row.
  var arows=otable.rows;
 
  //retrieve the rows collection for the table
  var acells=orow1.cells; 
  
  //retrieve the cells collection for the new row
  var ocell1_1=arows[orow1.rowIndex].insertCell(acells.length);
  
 // var ocell1_2=arows[orow1.rowIndex].insertCell(acells.length);
 // var ocell1_3=arows[orow1.rowIndex].insertCell(acells.length);
 // var ocell1_4=arows[orow1.rowIndex].insertCell(acells.length);
 ocell1_1.innerHTML="<INPUT type=text name=ItemSub"+madd+" size=10>";
 }
  else
  {alert("添加已超过5");}
}-->
</script><input type=submit name=b1 value=submit >
</form>