用js增加一行,并传向下一个页面

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会议记录</title>
<style type="text/css">
<!--
a:link {
 text-decoration: none;
}
a:visited {
 text-decoration: none;
}
a:hover {
 text-decoration: none;
}
a:active {
 text-decoration: none;
}
.style1 {color: #000000}

.style2 {
 color: #FF0000;
 font-size: 12px;
}
body,td,th {
 font-size: 12px;
}
body {
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
}
-->
</style>
<link href="guotu/CssGT.css" rel="stylesheet" type="text/css">
</head>

<body >
  <form  id="form1" name="form1" action="insert.jsp" method="post"> 
  <table     align=center   width=640     name="insertform"   id="insertform">
  <tr><td align="right" colspan="3"><input type="button" name="button" value="修改记录" οnclick= "javascript:window.open('selectHenJi.jsp','_blank')";/></td></tr>

    
  <tr><td align="right" colspan="3"><input type="submit" name="submit" value="保存" />&nbsp;&nbsp;<input   type="button"   class="button"   value="新增"   id=button2   name=button2   οnclick="InsertTr()"></td></tr>
<tr>  
  <td   align=left><select name="fayan_person1" id="fayan_person0">
    <option value="null">请选择发言人</option>
   
  <option value="<%=listPerson.get(0).toString()%>"><%=listPerson.get(1).toString()%></option>;
 
  </select></td><td><textarea name="content1" cols="65" rows="5" id="content1"></textarea></td>
  <td align=center><input   type="button"   value="删除" onClick="tsChange('1');if(confirm('确定要删除吗?'))document.all.insertform.deleteRow(parentNode.parentNode.rowIndex)"></td>
 </tr> 


 </table>  
  
 
 <input type=hidden name="iNum" id="iNum" value="1">
 
  </form>
</body>
</html>
  <script>  
   
  function   InsertTr()  
  {  
  var iNum=parseInt(form1.iNum.value);  
  iNum=iNum+1;  
  form1.iNum.value=iNum;  
  oRow=insertform.insertRow();  
   
  strTemp="<select name='fayan_person"+iNum+"' id='fayan_person"+iNum+"'> <option value='null'>请选择发言人</option>";
  strTemp+="<option value='<%=listPerson.get(0).toString()%>'><%=listPerson.get(1).toString()%></option>";
  strTemp+="</select>";
  oCell=oRow.insertCell();  
  oCell.bgColor=""  
  oCell.innerHTML=strTemp;  
  oCell.align="center";


  strTemp="<textarea cols=65 rows=5 name=content"+iNum+" id=content"+iNum+" οnchange='getAmount("+iNum+")'></textarea>";  
  oCell=oRow.insertCell();  
  oCell.bgColor=""  
  oCell.innerHTML=strTemp;  
  oCell.align="center";  
   
   
   
  strTemp="<input   type='button'   value='删除'   class='button'   οnclick='tsChange("+iNum+");if   (confirm(/"确定要删除吗?/"))document.all.insertform.deleteRow(parentNode.parentNode.rowIndex)'>";  
 
  oCell=oRow.insertCell();  
  oCell.bgColor="";  
  oCell.align="center";  
  oCell.innerHTML=strTemp;  
  }  

  function tsChange(name){
  var rownum = name;
  window.location.href = "insert.jsp?delete=delete&num=" + rownum;
 
 }


  </script>  
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值