【急救】

starbhhc 2010-04-25 05:25:15
提问一个问题,(jsp)我把所有图片查询出来了,name id 日期,发在文本框里,点击修改,我调试了一下,form里面什么都没有。。谢谢各位大虾
...全文
52 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
starbhhc 2010-04-25
  • 打赏
  • 举报
回复
/**
*
*/
private static final long serialVersionUID = 1L;
private int pictureid;
private String pname;
private String pdata;
private String psize;
private String pformat;
private String ppath;
private String pimages;
private String pwidth;
private String pheight;
private String classificationType;
private String pstatus;

public PictureactionForm() {
super();
}
public PictureactionForm(int pictureid, String pname, String pdata,
String psize, String pformat, String ppath, String pimages,
String pwidth, String pheight, String classificationType,
String pstatus) {
super();
this.pictureid = pictureid;
this.pname = pname;
this.pdata = pdata;
this.psize = psize;
this.pformat = pformat;
this.ppath = ppath;
this.pimages = pimages;
this.pwidth = pwidth;
this.pheight = pheight;
this.classificationType = classificationType;
this.pstatus = pstatus;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public int getPictureid() {
return pictureid;
}
public void setPictureid(int pictureid) {
this.pictureid = pictureid;
}
public String getPname() {
return pname;
}
public void setPname(String pname) {
this.pname = pname;
}
public String getPdata() {
return pdata;
}
public void setPdata(String pdata) {
this.pdata = pdata;
}
public String getPsize() {
return psize;
}
public void setPsize(String psize) {
this.psize = psize;
}
public String getPformat() {
return pformat;
}
public void setPformat(String pformat) {
this.pformat = pformat;
}
public String getPpath() {
return ppath;
}
public void setPpath(String ppath) {
this.ppath = ppath;
}
public String getPimages() {
return pimages;
}
public void setPimages(String pimages) {
this.pimages = pimages;
}
public String getPwidth() {
return pwidth;
}
public void setPwidth(String pwidth) {
this.pwidth = pwidth;
}
public String getPheight() {
return pheight;
}
public void setPheight(String pheight) {
this.pheight = pheight;
}
public String getClassificationType() {
return classificationType;
}
public void setClassificationType(String classificationType) {
this.classificationType = classificationType;
}
public String getPstatus() {
return pstatus;
}
public void setPstatus(String pstatus) {
this.pstatus = pstatus;
}

这是actionform
starbhhc 2010-04-25
  • 打赏
  • 举报
回复
<div id="container">
<table width="1019" height="88" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="183" colspan="7" background="images/tou.jpg"><table width="1019" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="183"> </td>
<td width="258" valign="top">

<A href="javascript:show('div1')"></A>
<table width="258" height="178" border="0" cellpadding="0" cellspacing="0" background="images/bg_2.jpg">
<tr>
<td width="188" align="center" valign="top"><span class="STYLE11"><c:if test="${loginusers==null}">
你还没有登陆!(请登陆)
</c:if>
<c:if test="${loginusers!=null}">你目前登陆的用户是:[ ${sessionScope.loginusers.username} ]
<br>
<a href="userinfo.do?method=closeSession">注销用户</a>
</c:if><br>
<%!
public String getClientIp(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return ip;

}
public static String getMyIp()throws Exception{
String cmd="ipconfig";
Process p=Runtime.getRuntime().exec(cmd);
java.io.InputStream in=p.getInputStream();
java.io.BufferedReader br=new java.io.BufferedReader(new java.io.InputStreamReader(in));
String line=null;
String ip=null;
while((line=br.readLine())!=null){
System.out.print(line+"<br>");
if(line.indexOf("IP Address")!=-1){
ip=line.substring(line.indexOf(":")+1);
break;
}
}
in.close();
br.close();
return ip;
}
%>
<%
out.print("你的IP为:"+getClientIp(request)+","+getMyIp());
%>
</span></td>
<td width="70" align="left" valign="top"><a href="javascript:show('div1')"><img src="images/deng.gif" alt="s" width="54" height="53" border="0" align="middle"></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="44" background="images/bg.jpg"><table width="1019" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16" height="44"><img src="images/kaishi.jpg" width="16" height="44" /></td>
<td width="135"><a href="index.jsp"><img src="images/shouye.jpg" width="135" height="44" border="0" /></a></td>
<td width="125"><a href="products.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','images/zhanshidating.jpg',1)"><img src="images/2.jpg" name="Image14" width="125" height="44" border="0"></a><a href="products.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','images/zsdt.png',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','images/zhanshidating.jpg',1)"></a></td>
<td width="113"><a href="download.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','images/canpinxiazai.jpg',1)"><img src="images/1.jpg" name="Image15" width="113" height="44" border="0"></a><a href="download.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','images/cpxz.png',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','images/canpinxiazai.jpg',1)"></a></td>
<td width="113"><a href="help.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','images/caozuozhinan.jpg',1)"><img src="images/2.jpg" name="Image16" width="113" height="44" border="0"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','images/caozuozhinan.jpg',1)"></a></td>
<td width="100"><a href="help.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image17','','images/taolunqu.jpg',1)"><img src="images/4.jpg" name="Image17" width="100" height="44" border="0"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','images/taolunqu.jpg',1)"></a></td>
<td width="417"><img src="images/houmain.jpg" width="290" height="44" /></td>
</tr>
</table> </td>
</tr>
</table>
</div>

<div><!-- InstanceBeginEditable name="EditRegion3" -->
<table width="1024" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23"> </td>
</tr>
</table>
<table width="1024" height="191" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="191" align="center" valign="middle"><span class="STYLE11 STYLE14">
</span><img src="images/help.png" width="1004" height="197"></td>
</tr>
</table>
<table width="1024" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="1024" height="555" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="757" height="555" align="center" valign="top"><table width="749" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/caozuo.gif" width="747" height="28"></td>
</tr>
</table>

<table width="760" height="785" border="0" cellpadding="0" cellspacing="0" bordercolor="#66DCF9">
<TBODY>
<c:forEach var="pic" items="${requestScope.list}" varStatus="status">
<c:if test="${status.index%2==0}">
<tr>
</c:if>
<td width="807" height="343" valign="top">
<form name="frm" method="post" action="#">
<table width="354" height="343" border="0" align="left" cellpadding="0" cellspacing="0">
<tr> <td height="2" colspan="3" align="center" valign="bottom"><hr width="350"></td>
<td width="4" rowspan="9" align="left" valign="top"> </td>
</tr>
<tr>
<td width="145" rowspan="7" align="center" valign="middle"><img src="picture/<bean:write name="pic" property="pname"/>" alt="您截取的图片" width="145" height="167"></td>
<td height="47"><span class="STYLE18">图片名称:</span></td>
<td>
<input id="pname" name="pname" type="text" onblur="checkForm()" value="<bean:write name='pic' property='pname'/>" size="18">
</td>
</tr>
<tr>
<td width="78" height="39"><span class="STYLE18">图片类型:</span></td>
<td width="131"><input name="pformat" disabled="disabled" value="<bean:write name="pic" property="pformat"/>"type="text" size="18"></td>
</tr>
<tr>
<td height="46"><span class="STYLE18">图片宽度:</span></td>
<td><input name="pwidth" type="text" value="<bean:write name="pic" property="pwidth"/>" disabled="disabled"size="18"></td>
</tr>
<tr>
<td height="48"><span class="STYLE18">图片高度:</span></td>
<td><input name="pheight"type="text" value="<bean:write name="pic" property="pheight"/>" disabled="disabled"size="18" ></td>
</tr>
<tr>
<td height="38"><span class="STYLE18">截图时间:</span></td>
<td><input name="pdata" value="<bean:write name="pic" property="pdata"/>" type="text" disabled="disabled"size="18"></td>
</tr>
<tr>
<td height="41"><span class="STYLE18"><a href="javaScript:submits()">删除/批量</a></span></td>
<td><input name="deletem" type="checkbox" id="deletem" value="<bean:write name="pic" property="pictureid"/>"></td>
</tr>
<tr>
<td height="38" valign="middle">
<span class="STYLE18">
<a href="picture.do?method=updatepictureByName&id=<bean:write name="pic" property="pictureid"/>">修改</a></span></td>
<td valign="middle"><span class="STYLE18"><a href="picture.do?method=deletePictureInfo&id=<bean:write name="pic" property="pictureid"/>">删除</a></span></td>
</tr>
<tr>
<td height="1" colspan="3" align="center" valign="middle"><hr width="350"></td>
</tr>
</table>
</form>
</td>
<c:if test="${status.index%2==1}">
</tr>
</c:if>
</c:forEach>
</TBODY>
</table>

<td height="112"> </td>
这是查询所有,点击修改没执行操作!
starbhhc 2010-04-25
  • 打赏
  • 举报
回复
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html>
<head>
<base href="<%=basePath%>">

<title>图片详细信息</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<style type="text/css">
<!--
.STYLE18 {font-size: 12px; color: #FFFFFF; }
-->
</style>
<style type="text/css">
body{
background-image:url(images/zhuatu_27.jpg);
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a{
font-size:14px;
text-decoration:none;
color:#0066FF;
}
a:hover{
font-size:14px;
text-decoration:underline;
color:#FFFFFF;
}
.bottom{
font-size:16px;
font-family:"宋体";
color:#FFFFFF;}
.STYLE11 {color: #FFFFFF; font-size: 14px; font-family: "宋体"; }
div1 {
position:absolute;
left:775px;
top:51px;
width:224px;
height:128px;
z-index:1;
}
.STYLE12 {
font-size: 14px;
color: #FFFFFF;
}

</style>

<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

<script type="text/javascript" language="javascript">
function show(checkbox_list){
var checkbox_list = document.getElementById(checkbox_list);
checkbox_list.style.display = "block";
}
function hidden(checkbox_list){
var checkbox_list = document.getElementById(checkbox_list);
checkbox_list.style.display = "none";
}

function reg(){
document.form1.action="resgister.jsp";
document.form1.submit();
}
</script>
<script language="javascript">
function checkSelected()
{
var str="";
var mess=document.getElementsByName("deletem");
for(var i=0;i<mess.length;i++)
{
if(mess[i].checked==true)
{
str="yixuan";
}
}
if(str=="")
{
alert("请选择要删除的图片!");
return false;
}
return true;
}
function submits()
{

if(checkSelected())
{
document.frm.action="picture.do?method=deletebatchPicture";
document.frm.submit();
}
}

function checkForm(){

var filepath = document.getElementById("pname").value;
var extname = filepath.substring(filepath.lastIndexOf(".")+1,filepath.length);
extname = extname.toLowerCase();//处理了大小写
if(extname!= "bmp"&&extname!= "jpg"&&extname!= "gif"){
alert("只能修改bmp,jpg,gif格式的图片!");
return false;
}
}


</script>

</head>
<body id=home onLoad="MM_preloadImages('images/tu_1.jpg','images/tu_2.jpg','images/tu_3.jpg','images/tu_4.jpg','images/tu_1.gif','images/tu_2.gif','images/tu_3.gif','images/tu_4.gif')">

<div id="div1" style="position:absolute; display:none; left:775px;top:51px;width:224px;height:128px;z-index:1;">
<form name="form1" method="post" action="">
<table cellpadding=0 cellspacing=0 width="220" height="126" border="0">
<tr>
<td colspan="2" align="center" valign="middle" ><span class="STYLE12">欢迎登陆</span></td >
</tr>
<tr>
<td width="65"><span class="STYLE12">用户名</span></td >
<td width="155" align="left" valign="middle"><label>
<input type="text" name="username" size="20" maxlength="15">
</label></td >
</tr>
<tr>
<td ><span class="STYLE12">密  码</span></td >
<td align="left" valign="middle"><label>
<input type="password" name="password" size="21" maxlength="15" >
</label></td >
</tr>
<tr>
<td colspan="2" align="center" valign="middle"><label>
<input type="submit" name="sub" value="提 交" >  
</label> <label>
<input type="reset" name="res" value="注 册"onClick="reg()">
</label></td >
</tr>
</table>
</form>
</div>
longmei998 2010-04-25
  • 打赏
  • 举报
回复
代码!!

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧