当前位置: 电脑软硬件应用网 > 设计学院 > 网络编程 > javascript > 正文 |
|
|||
使用JSP + JAVABEAN + XML 开发的一个例子 | |||
2005-12-30 19:21:23 文/45IT收集 出处:电脑软硬件应用网 | |||
out.print(restaurant.getElementsByTagName("phone").item(0).getFirstChild().getNodeValue()); }%>" maxlength="20" > </td> <td class=tdsmall height=25> <input name="address" class=stedit style="HEIGHT: 22px; WIDTH: 200px" value="<% if(restaurant.getElementsByTagName("address").item(0).hasChildNodes()){ out.print(restaurant.getElementsByTagName("address").item(0).getFirstChild().getNodeValue()); }%>" maxlength="100" > </td> <td class=tdsmall height=25 width="25"><a href="javascript:if (checkform()==false);"><img border=0 height=15 src="../../images/editok.gif" width=15></a></td> <td class=tdsmall height=25 width="25"> </td> </form> </tr> <% }else{ //显示正常的格式 %> <tr align="center" bgcolor="#ffffff" valign="middle"> <td class=tdsmall height=25 width="20"><%=(i+1)%></td> <td class=tdsmall height=25 width="0"><%if(restaurant.getElementsByTagName("name").item(0).hasChildNodes()){ out.print(restaurant.getElementsByTagName("name").item(0).getFirstChild().getNodeValue()); }%> </td> <td class=tdsmall height=25 width="0"><%if(restaurant.getElementsByTagName("phone").item(0).hasChildNodes()){ out.print(restaurant.getElementsByTagName("phone").item(0).getFirstChild().getNodeValue()); }%></td> <td class=tdsmall height=25 width="0"> <% if(restaurant.getElementsByTagName("address").item(0).hasChildNodes()){ out.print(restaurant.getElementsByTagName("address").item(0).getFirstChild().getNodeValue()); }%> </td> <td class=tdsmall height=25 width="30"><a href="<%=request.getRequestURI()%>?act=modi&recordId=<%=restaurant.getAttributeNode("id").getNodeValue()%>"><img border=0 height=15 src="../../images/edit.gif" width=15></a></td> <td class=tdsmall height=25 width="30"><img border=0 height=15 onClick="javascript:if(confirm('您是否确定删除本记录,删除后将导至记录无法使用?')){window.location.href='<%=request.getRequestURI()%>?act=del&recordId=<%=restaurant.getAttributeNode("id").getNodeValue()%>';}" src="../../images/delete.gif" style="CURSOR: hand" width=15> </td> </tr> <% } }%> <% if (strOperation=="addnew"){ //显示新增的格式%> <tr align="center" bgcolor="#ffffff" valign="middle"> <form name=dataform2 action="<%=request.getRequestURI()%>?act=addnewDo" method="post" onSubmit='return checkform2(this);' > <td class=tdsmall height=25 width="20"></td> <td class=tdsmall height=25> <input name="name" class=stedit style="HEIGHT: 22px; WIDTH: 150px" value="" maxlength="40" > </td> <td class=tdsmall height=25> <input name="phone" class=stedit style="HEIGHT: 22px; WIDTH: 100px" value="" maxlength="20" > </td> <td class=tdsmall height=25> <input name="address" class=stedit style="HEIGHT: 22px; WIDTH: 200px" value="" maxlength="100" > </td> <td class=tdsmall height=25 width="25"><a href="javascript:if (checkform2()==false);"><img border=0 height=15 src="../../images/editok.gif" width=15></a></td> <td class=tdsmall height=25 width="25"> </td> </form> </tr> <% } %> </tbody> </table> <br> <table align=center border=0 cellpadding=0 cellspacing=2 width="95%"> <tbody> <tr valign=center> <td align=middle> <br> <table border=0 cellpadding=0 cellspacing=0> <tr> <td> <% if (strOperation=="addnew"){ %> <input class=stbtm name=update onClick="javascript:if (checkform2()==false);" type=button value="更新记录"> <% }else{ if(strOperation=="modi"){ %> <input class=stbtm name=update onClick="javascri |
|||
最新热点 | 最新推荐 | 相关文章 | ||
javascript实用技巧点滴(三) javascript实用技巧点滴(2) javascript实用技巧点滴(1) javascript教程 - 第一课 1.1 用js制作完善的日,月组合下拉框 利用JSP编程建立动态Web站点 用PHP制作留言板 PHP生成动态WAP页面 PHP实现文件下载 PHP4的session功能 |
关于45IT | About 45IT | 联系方式 | 版权声明 | 网站导航 | |
Copyright © 2003-2011 45IT. All Rights Reserved 浙ICP备09049068号 |