⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 piccheck.jsp

📁 这是一个简单但是很实用的JSP应用实例
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.lang.*,java.io.*" %>
<%@include file="/db/dbPool.inc"%>
<HTML><HEAD><TITLE>图片信息</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link href="/lib/main.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" media="all" href="/lib/calendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 3px;
	margin-right: 3px;
	margin-bottom: 3px;
}
.fStar {	color: #FF0000;
	font:Arial;
	font-weight: normal; 
	font-size: 14px;
}
td{
	border-left-width:0px;
	border-right-width:0px;
	border-top-width:0px;
	border-bottom-width:0px;
}
-->
</style>
</head>
<script src="/lib/calendar/js/calendar.js"></script>
<script src="/lib/calendar/js/calendar-zh.js"></script>
<script src="/lib/calendar/js/calendar-setup.js"></script>
<script src="/lib/jsFunc.js"></script>
<script src="/office/lib/strfunc.js"></script>
<script language="javascript">
function checkFm(fm)
{
	with(document.fm)
	{
		pLength=picFile.value.length;
		if(trim(picFile.value)==""){
			alert("请选择你要上传的图片!");
			picFile.focus();
			return false;
		}
		if(picFile.value.substring(pLength-4,pLength)!=".bmp"){
			alert("所传图片必须为bmp格式!");
			picFile.select();
			return false;
		}
		else
			return(confirm("您确定要发布该图片吗?"));
	}
}
</script>
<%
	//String pID=(String)session.getValue("pID");
	String pID=request.getParameter("pID");
	//String pName=request.getParameter("pName");
	//String picName=request.getParameter("picName");
	Statement stmt=conn1.createStatement();
	ResultSet rs=stmt.executeQuery("select * from partsInfo where pID='"+pID+"'");
	rs.next();
	String pName=rs.getString("pName");
	String picName=rs.getString("picName");
%>
<BODY style="background-color:#FFFFFF " text="000000" link="000099"  vlink="000099" alink="ff0000" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>【<strong>图片信息</strong>】</td>
  </tr>
</table>
<br>
<form name="fm" action=" " method="post" enctype="multipart/form-data">
<input type="hidden" name="pID" value="<%=pID%>">
<input type="hidden" name="picName" value="<%=picName%>">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
  <tr><td colspan="2" align="center"><font style="font-size:18px; font-weight:bold"><%=picName%></font></td></tr>
  <tr>
    <td width="50%" align="right"><strong>零部件编码:</strong><%=pID%>&nbsp;&nbsp;</td>
	<td align="left">&nbsp;&nbsp;<strong>零部件名称:</strong><%=pName%></td>
  </tr>
  <tr>
    <td colspan="2"><hr width="65%"></td>
  </tr>
  <tr><td colspan="2" align="center"><a href="#"><img name="partPic" border="0" lowsrc="../uploadFiles/partPics/<%=picName+".bmp"%>" width="400" height="300" ></a></td></tr>
  <tr><td colspan="2" align="center">
	<input type="button" class="flatBtn" value="返 回" onClick="history.back()" style="width:50">
  </td></tr>
</table>
</form>
</BODY>
</HTML>
<%@ include file="/db/dbpoolEnd.inc" %>
<script src="/lib/jsFooter.js"></script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -