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

📄 update.jsp

📁 用jsp做的一个小例子
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@page import="com.today.prodect.vo.Prodect"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function change(){

document.form1.imag.src=document.form1.f.value;
}
function fun()
{

document.getElementById("image").src="img.jsp";

return false;
}

</script>
</head>

<body>
<center>
<%
Prodect proc=(Prodect)request.getAttribute("PRO");
 %>
<form action="ProdectServlet?method=updatePro" name="form1" method="post">
<input type="hidden" name="p_id" value="<%=proc.getP_id() %>">
<table width="60%" border="1">
  <tr>
    <td height="39" colspan="6"><div align="center"><strong>商品修改</strong></div></td>
    </tr>
  <tr>
    <td width="90" height="40">商品名称</td>
    <td colspan="2"><input type="text" name="p_name" value="<%=proc.getP_name()%>">商品价格<input type="text" name="p_price" value="<%=proc.getP_price() %>"></td>
    <td width="41" colspan="3" rowspan="3"></td>
    </tr>
  <tr>
    <td height="180">商品介绍</td>
    <td colspan="2">
    <input type="hidden"  name="p_content" value='<%=proc.getP_content()%>' ></input>
		<IFRAME ID="eWebEditor1" src="/Jsp_Example/eWebEditor/ewebeditor.htm?id=p_content&style=coolblue&extcss=_example/myeditorarea.css" frameborder="0" scrolling="no" width="550" height="350"><%=proc.getP_content() %></IFRAME>
   
    </td>
    </tr>
      <tr>
    <td height="50" width="180">商品图片</td>
    <td colspan="2">
    <input type="file" name="f" onchange="change()">
    </td>
      <tr>
    <td height="180">图片展示</td>
    <td colspan="2">
   <img name="imag" src="<%=proc.getP_ipath()%>">
    </td>
    </tr>
    
  <tr>
    <td height="30">验证码:</td>
    <td width="81"><a href="return false"><img id="image" onclick="JavaScript:return fun();" src="img.jsp"></a></td>
    <td width="117"><input type="text" name="vali" ></td>
  </tr>
</table>
<input type="submit" value="submit update">
</form>
</center>

</body>
</html>

⌨️ 快捷键说明

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