📄 petadd_jsp.java
字号:
package org.apache.jsp.pet;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class petadd_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>petadd</title>\r\n");
out.write("<script type=\"text/javascript\">\r\n");
out.write("<!--\r\n");
out.write("function MM_findObj(n, d) { //v4.01\r\n");
out.write(" var p,i,x; if(!d) d=document; if((p=n.indexOf(\"?\"))>0&&parent.frames.length) {\r\n");
out.write(" d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}\r\n");
out.write(" if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];\r\n");
out.write(" for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);\r\n");
out.write(" if(!x && d.getElementById) x=d.getElementById(n); return x;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("function MM_validateForm() { //v4.0\r\n");
out.write(" var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;\r\n");
out.write(" for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);\r\n");
out.write(" if (val) { nm=val.name; if ((val=val.value)!=\"\") {\r\n");
out.write(" if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');\r\n");
out.write(" if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\\n';\r\n");
out.write(" } else if (test!='R') { num = parseFloat(val);\r\n");
out.write(" if (isNaN(val)) errors+='- '+nm+' must contain a number.\\n';\r\n");
out.write(" if (test.indexOf('inRange') != -1) { p=test.indexOf(':');\r\n");
out.write(" min=test.substring(8,p); max=test.substring(p+1);\r\n");
out.write(" if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\\n';\r\n");
out.write(" } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\\n'; }\r\n");
out.write(" } if (errors) alert('输入有误,所有人Id有误,id为数字');\r\n");
out.write(" document.MM_returnValue = (errors == '');\r\n");
out.write("}\r\n");
out.write("//-->\r\n");
out.write("</script><style type=\"text/css\">\r\n");
out.write(" <!--\r\n");
out.write(" .STYLE1 {color: #0066FF}\r\n");
out.write(" -->\r\n");
out.write("</style>\r\n");
out.write("<meta http-equiv=\"content-type\" content=\"text/html; chstset=utf-8\"/>\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<form action=\"../controller?action=pet&method=padd\" method=\"post\" name=\"form2\">\r\n");
out.write("<br/>\r\n");
out.write("<br/>\r\n");
out.write("<p align=\"center\">\r\n");
out.write(" <span class=\"STYLE1\">添加宠物所有人</span>\r\n");
out.write("</p>\r\n");
out.write("<br/>\r\n");
out.write("<table width=\"305\" border=\"0\" align=\"center\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"86\">所有人id:</td>\r\n");
out.write(" <td width=\"209\">\r\n");
out.write(" <input name=\"hid\" type=\"text\" id=\"hid\"\r\n");
out.write(" onblur=\"MM_validateForm('hid','','NisNum');return document.MM_returnValue\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td>性别</td>\r\n");
out.write(" <td>\r\n");
out.write(" <label>\r\n");
out.write(" <input name=\"sex\" type=\"radio\" value=\"雄性\" checked>\r\n");
out.write(" 雄性\r\n");
out.write(" <input type=\"radio\" name=\"sex\" value=\"雌性\">\r\n");
out.write(" 雌性\r\n");
out.write(" </label>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td>名称:</td>\r\n");
out.write(" <td>\r\n");
out.write(" <input name=\"name\" type=\"text\" id=\"name\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td>种类:</td>\r\n");
out.write(" <td>\r\n");
out.write(" <input name=\"kind\" type=\"text\" id=\"kind\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td> </td>\r\n");
out.write(" <td>\r\n");
out.write(" <label>\r\n");
out.write(" <input type=\"submit\" name=\"Submit\" value=\"提交\">\r\n");
out.write(" <input type=\"reset\" name=\"Submit2\" value=\"重置\">\r\n");
out.write(" </label>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("</form>\r\n");
out.write("<br/>\r\n");
out.write("<br/>\r\n");
out.write("<br/>\r\n");
out.write("<br/>\r\n");
out.write("<a href=\"pet.jsp\">返回</a>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -