<html>
<head>
</head>
<body >
<script language="javascript" type="text/javascript">
var count=0 ;
function additem(id)
{
var row,cell,str;
row = document.getElementById(id).insertRow();
if(row != null )
{
cell = row.insertCell();
cell.innerHTML="<input id=\"St"+count+"\" type=\"text\" name=\"St"+count+"\" value= \"St"+count+"\"><input type=\"button\" value=\"删除\" onclick=\'deleteitem(this);\'>";
count ++;
}
}
function deleteitem(obj)
{
var curRow = obj.parentNode.parentNode;
tb.deleteRow(curRow.rowIndex);
}
function getsub()
{
var re="";
for (var i = 0 ;i<count;i++)
{
re += document.getElementsByName("St"+i)[0].value;
}
document.getElementById("Hidden1").value=re;
}
</script>
<form>
<table id="tb"></table>
<input name="button" type="button" onclick='additem("tb")' value="添加>>"/><input type="submit" name="submit" onclick="getsub()" value="提交"/>
<input id="Hidden1" name="Hidden1" type="hidden" value="" />
</form>
</body>
</html>