📄 petup.jsp~39~
字号:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<meta http-equiv="content-type" content="text/html; chstset=utf-8" />
<title>
petup
</title>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('输入有误..所有人编号必须是数字');
document.MM_returnValue = (errors == '');
}
//-->
</script>
<style type="text/css">
<!--
.STYLE1 {color: #0033FF}
.STYLE2 {color: #FFFFFF}
-->
</style>
</head>
<body bgcolor="#ffffff">
<h1 align="center" class="STYLE1">修改宠物信息</h1>
<form name="form1" method="post" action="../controller?action=pet&method=name_up">
<table width="351" border="0" align="center">
<tr>
<td width="75" height="36">宠物名:</td>
<td width="167">
<input name="upname" type="text" id="upname" size="20"></td>
<td width="95"><input type="submit" name="Submit" value="提交"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
<table width="858" border="0" align="center">
<tr>
<td width="94">编号</td>
<td width="105">所有人编号</td>
<td width="112">宠物名</td>
<td width="110">种类</td>
<td width="109">性别</td>
<td width="109">登记时间</td>
<td width="111"> </td>
</tr>
<c:forEach var="pup" items="${requestScope.pet}">
<form name="form5" method="post" action="${pageContext.request.contextPath}/controller?action=pet&method=pup">
<tr>
<% //${pageContext.request.contextPath}%>
<td><input name="pid" type="text" class="STYLE1" id="pid"
value="${pup.pid}" size="15" readonly="true"
></td>
<td><input name="phid" type="text" id="phid" size="15" value="${pup.phid}"
onblur="MM_validateForm('phid','','NisNum');return document.MM_returnValue"
></td>
<td><input name="name" type="text" id="name" size="13" value="${pup.pname}"></td>
<td><input name="kind" type="text" id="kind" size="13" value="${pup.pkind}"></td>
<td><select name="sex" >
<option value="${pup.psex}">${pup.psex}</option>
<option value="雄性">雄性</option>
<option value="雌性">雌性</option>
</select></td>
<td>${pup.ptime}</td>
<td><input name="Submit2" type="submit" value="修改"></td>
</tr>
</form>
</c:forEach>
</table>
<p align="center" class="STYLE2"> </p>
<br/> <br/> <br/>
<a href="pet.jsp">返回</a>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -