jsp中如何点击单选按钮,进行修改和删除 30
自己做的管理系统,用的myeclipse,在jsp中进行点击一个单选按钮时,“修改”按钮跳出,如何单击修改能跳转到修改页面,并且能显示直接的内容,用的<%=diarypo...
自己做的管理系统,用的myeclipse,在jsp中进行点击一个单选按钮时,“修改”按钮跳出,如何单击修改能跳转到修改页面,并且能显示直接的内容,用的<%=diarypo.getID()%>传递id号并且点击时<form>表单进行跳转。但点击删除时不知道怎么弄,<form>表单里面已经设置了<form name="updateDiary" method="post" action="PreDiarymodifyAction.do">跳转到修改页面了,怎么才能分开跳转,上面有截图还有全部代码,
<html><head><title>学生宿舍管理系统</title></head><script> function selectOneValue() { var currentBtn = document.getElementById("button_updateDiary"); currentBtn.style.display = "block"; //style中的display属性 var idd=document.getElementById("diarypoId"); alert(idd.value); } function doSubmitModify() { updateDiary.submit(); } function deleteDiary() { deleteDiary.submit(); }</script><body bgcolor=#ADEAEA onload="init();"><h1>外来人员登记表:</h1><form name=addDiary action="addDiary.jsp"><input type="submit" value="新增" ></form><form name="updateDiary" method="post" action="PreDiarymodifyAction.do"><table align=center id=Diary_table border="1"><tr><td width="4%"> </td><th width="10%">ID</th><th width="10%">登记人姓名</th><th width="10%">登记日期</th><th width="10%">登记内容</th></tr>
<tr > <% List diarypo_arraylist=(List)request.getAttribute("diarypo_arraylist"); int size=diarypo_arraylist.size(); for(int i=0;i<size;i++) { DiaryPO diarypo=(DiaryPO)diarypo_arraylist.get(i); %> <td height="26" align="center"> <input type="radio" name="diarypoId" id="diarypoId" value="<%=diarypo.getID()%>" onclick="selectOneValue()"></td> <td width="10%" align="center"><%=diarypo.getID()%></td> <td width="10%" align="center"><%=diarypo.getStranger()%></td> <td width="10%" align="center"><%=diarypo.getDiary_Date()%></td> <td width="10%" align="center"><%=diarypo.getDiary_Descripe()%></td> </tr> <% }%> </table><input id="button_updateDiary" name="button_updateDiary" type="button" class="button01" value='修改' style="display:none;"onClick="doSubmitModify()"></form><form name="deleteDiary" method="post" action="DiarydeleteAction.do"><input id="button_deleteDiary" name="button_deleteDiary" type="button" class="button02" value='删除'onClick="deleteDiary()"> </form></body></html> 展开
<html><head><title>学生宿舍管理系统</title></head><script> function selectOneValue() { var currentBtn = document.getElementById("button_updateDiary"); currentBtn.style.display = "block"; //style中的display属性 var idd=document.getElementById("diarypoId"); alert(idd.value); } function doSubmitModify() { updateDiary.submit(); } function deleteDiary() { deleteDiary.submit(); }</script><body bgcolor=#ADEAEA onload="init();"><h1>外来人员登记表:</h1><form name=addDiary action="addDiary.jsp"><input type="submit" value="新增" ></form><form name="updateDiary" method="post" action="PreDiarymodifyAction.do"><table align=center id=Diary_table border="1"><tr><td width="4%"> </td><th width="10%">ID</th><th width="10%">登记人姓名</th><th width="10%">登记日期</th><th width="10%">登记内容</th></tr>
<tr > <% List diarypo_arraylist=(List)request.getAttribute("diarypo_arraylist"); int size=diarypo_arraylist.size(); for(int i=0;i<size;i++) { DiaryPO diarypo=(DiaryPO)diarypo_arraylist.get(i); %> <td height="26" align="center"> <input type="radio" name="diarypoId" id="diarypoId" value="<%=diarypo.getID()%>" onclick="selectOneValue()"></td> <td width="10%" align="center"><%=diarypo.getID()%></td> <td width="10%" align="center"><%=diarypo.getStranger()%></td> <td width="10%" align="center"><%=diarypo.getDiary_Date()%></td> <td width="10%" align="center"><%=diarypo.getDiary_Descripe()%></td> </tr> <% }%> </table><input id="button_updateDiary" name="button_updateDiary" type="button" class="button01" value='修改' style="display:none;"onClick="doSubmitModify()"></form><form name="deleteDiary" method="post" action="DiarydeleteAction.do"><input id="button_deleteDiary" name="button_deleteDiary" type="button" class="button02" value='删除'onClick="deleteDiary()"> </form></body></html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询