📄 admin_005faddnewbook_jsp.java
字号:
package org.apache.jsp.admin;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class admin_005faddnewbook_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object 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=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", 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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>无标题文档</title>\r\n");
out.write("<script language=\"JavaScript\" 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('The following error(s) occurred:\\n'+errors);\r\n");
out.write(" document.MM_returnValue = (errors == '');\r\n");
out.write("}\r\n");
out.write("//-->\r\n");
out.write("</script>\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("body,td,th {\r\n");
out.write("\tfont-size: 13px;\r\n");
out.write("}\r\n");
out.write("body {\r\n");
out.write("\tbackground-image: url(../images/R6C.GIF);\r\n");
out.write("}\r\n");
out.write("-->\r\n");
out.write("</style></head>\r\n");
out.write("\r\n");
out.write("<body>\r\n");
out.write("<p><strong>录入新书(请仔细输入新书的各项信息)\r\n");
out.write("</strong></p>\r\n");
out.write("<form name=\"form1\" method=\"post\" action=\"admin_addnewbook_post.jsp\">\r\n");
out.write(" <p>图书全名:\r\n");
out.write(" <input name=\"bookname\" type=\"text\" id=\"bookname\">\r\n");
out.write("</p>\r\n");
out.write(" <p>图书编号:\r\n");
out.write(" <input name=\"bookid\" type=\"text\" id=\"bookid\">\r\n");
out.write("</p>\r\n");
out.write(" <p>图书分类:\r\n");
out.write(" <select name=\"booktype\" id=\"booktype\">\r\n");
out.write(" <option value=\"计算机类\">计算机类</option>\r\n");
out.write(" <option value=\"文学语言类\">文学语言类</option>\r\n");
out.write(" <option value=\"社会科学类\">社会科学类</option>\r\n");
out.write(" <option value=\"娱乐休闲类\">娱乐休闲类</option>\r\n");
out.write("\t <option value=\"期刊杂志类\">期刊杂志类</option>\r\n");
out.write(" <option value=\"历史自然类\">历史自然类</option>\r\n");
out.write(" </select> \r\n");
out.write(" </p>\r\n");
out.write(" <p>初始入库量: \r\n");
out.write(" <input name=\"bookquantity\" type=\"text\" id=\"bookquantity\"> \r\n");
out.write(" (请输入数字)</p>\r\n");
out.write(" <p>\r\n");
out.write(" <input name=\"Submit\" type=\"submit\" onClick=\"MM_validateForm('bookname','','R','bookid','','R','bookquantity','','RisNum');return document.MM_returnValue\" value=\"录入到库\">\r\n");
out.write(" <input type=\"reset\" name=\"Submit2\" value=\"清除\">\r\n");
out.write(" </p>\r\n");
out.write("</form>\r\n");
out.write("<p> </p>\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 + -