请网页设计高手过目!!!!救火 分数不够再加!!!

chenguoli 2003-04-03 09:33:41
我的问题情况是这样的!
<%

ResultBean rWorkPlan = (ResultBean)request.getAttribute("SelectWorkPlanResult");
CachedRowSet v=rWorkPlan.getRs();
v.first();
System.out.println("go to workingplan");
System.out.println("This is row: " + v.getRow());
while(v.next())
{
out.print("<TR bgColor=#eeeecc>");
out.print("<TD align="+"middle"+">"+v.getString("PLAN_ID"));
out.print("<TD align="+"middle"+">"+v.getString("TYPE_A"));
//out.print("<TD align="+"center"+">"+v.getString("STAFF_ID");
out.print("<TD align="+"middle"+">"+v.getString("START_TIME").substring(0,10));
out.print("<TD align="+"middle"+">"+v.getString("END_TIME").substring(0,10));
out.print("<TD align="+"middle"+">"+v.getString("STATE_B"));
out.print("<TD align="+"middle"+">"+v.getString("SEND_STAFF_ID"));
out.print("<TD align="+"middle"+">"+v.getString("REV_STATE_ID"));
out.print("<TD align="+"middle"+">"+v.getString("CONTENT"));
out.print("<TD align="+"middle"+">"+v.getString("MEM"));
out.print("<TD align="+"middle"+">"+v.getString("PROGRESS"));
out.print("<a href=ModifWorkingPlan.jsp?PLAN_ID="+v.getString("PLAN_ID")
+"&TYPE_A="+ v.getString("TYPE_A")
+"&START_TIME="+v.getString("START_TIME").substring(0,10)
+"&END_TIME="+v.getString("END_TIME").substring(0,10)
+"&STATE_B="+v.getString("STATE_B")
+"&SEND_STAFF_ID="+v.getString("SEND_STAFF_ID")
+"&REV_STATE_ID="+v.getString("REV_STATE_ID")
+"&CONTENT="+v.getString("CONTENT")
+"&MEM="+v.getString("MEM")
+"&PROGRESS="+v.getString("PROGRESS")
+">修改</a>");
System.out.print("<a href=ModifWorkingPlan.jsp?PLAN_ID="+v.getString("PLAN_ID")
+"&TYPE_A="+ v.getString("TYPE_A")
+"&START_TIME="+v.getString("START_TIME").substring(0,10)
+"&END_TIME="+v.getString("END_TIME").substring(0,10)
+"&STATE_B="+v.getString("STATE_B")
+"&SEND_STAFF_ID="+v.getString("SEND_STAFF_ID")
+"&REV_STATE_ID="+v.getString("REV_STATE_ID")
+"&CONTENT="+v.getString("CONTENT")
+"&MEM="+v.getString("MEM")
+"&PROGRESS="+v.getString("PROGRESS")
+">修改</a>");
out.print("</TR>");
a=a+1;

}

if (v.isAfterLast() == true)
{
System.out.println("We have reached the end");
System.out.println("This is row: " + v.getRow());
}

%>
#############################
这些都是动态生成的
双击想对每条记录进行修改,想进入另外一张修改网面!如何传入每天记录到别外一张网叶
通过href=ModifWorkingPlan.jsp?PLAN_ID=value1&.....
有一个缺点就是&前遇到空格后面的参数就不能传了
想通其它方法,或者有没有高招????
向高手请教………
最好附代码或小例子
小弟不胜感激………
分数不够再加



...全文
19 点赞 收藏 14
写回复
14 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
chenguoli 2003-04-06
谢谢各位
回复
bjzhanghao 2003-04-04
用response.encodeURL("ab c")
回复
cugarwang 2003-04-04
还有一点,你这结构不太好,你让jsp做控制,servlet做显示,反过来了
回复
cugarwang 2003-04-04
<script language="javascript">
function switchTo(para1,para2,para3,para4,para5)
{
var url = "ModifWorkingPlan.jsp?action=test";
url += "¶1=" + escape(para1);
url += "¶2=" + escape(para2);
url += "¶3=" + escape(para3);
url += "¶4=" + escape(para4);
url += "¶5=" + escape(para5);
location.href=url;
}
</script>

out.println("<a href=\"#\" onclick=\"switchTo('1','2','3','4','5');\">");
回复
airlulu 2003-04-04
GZ楼上的方法。
也可以通过POST方式提交
回复
chenguoli 2003-04-04
<% String a=new java.net.URLEncoder("ab c");%>
这样也能传吗?

在编译时报错
javaCompile:构造器java.net.URLEncoder(java.lang.String) 未定义
可我己经加了
<%@ page import="java.net.*"%>
<%@ page import="java.net.URLEncoder"%>
<%@ page import="java.lang.String"%>
回复
Philzzf 2003-04-04
传递参数时对所有参数进行转码

String param=new java.net.URLEncoder(param);

然后在接受参数的页面用
String param=new java.net.URLDecoder(param);

再转回来
回复
chenguoli 2003-04-04
<a href=ModifWorkingPlan.jsp?PLAN_ID=3+TYPE_A=as +START_TIME=2003-02-15+END_TIME=2003-02-15+STATE_B=fds+SEND_STAFF_ID=23+REV_STATE_ID=23+CONTENT=sfd+MEM=adfaa+PROGRESS=23>修改</a>
<a href=ModifWorkingPlan.jsp?PLAN_ID=4+TYPE_A=2 +START_TIME=2020-02-02+END_TIME=2003-02-02+STATE_B=2 +SEND_STAFF_ID=1+REV_STATE_ID=1+CONTENT=2+MEM=2+PROGRESS=0>修改</a>
<a href=ModifWorkingPlan.jsp?PLAN_ID=5+TYPE_A=2 +START_TIME=2002-02-02+END_TIME=2002-03-03+STATE_B=2 +SEND_STAFF_ID=0+REV_STATE_ID=0+CONTENT=22+MEM=2+PROGRESS=0>修改</a>
<a href=ModifWorkingPlan.jsp?PLAN_ID=11+TYPE_A=null+START_TIME=2002-01-01+END_TIME=2002-01-01+STATE_B=AAA+SEND_STAFF_ID=1+REV_STATE_ID=1+CONTENT=222+MEM=222+PROGRESS=0>修改</a>
<a href=ModifWorkingPlan.jsp?PLAN_ID=12+TYPE_A=null+START_TIME=2002-01-01+END_TIME=2002-01-01+STATE_B=AAA+SEND_STAFF_ID=2+REV_STATE_ID=3+CONTENT=qqq+MEM=qqq+PROGRESS=0>修改</a>
回复
chenguoli 2003-04-04
03-3-4 8:55:13:508 CST] 59ad70f0 SystemOut U <a href=ModifWorkingPlan.jsp?PLAN_ID=3+TYPE_A=as +START_TIME=2003-02-15+END_TIME=2003-02-15+STATE_B=fds+SEND_STAFF_ID=23+REV_STATE_ID=23+CONTENT=sfd+MEM=adfaa+PROGRESS=23>修改</a>
[03-3-4 8:55:13:528 CST] 59ad70f0 SystemOut U <a href=ModifWorkingPlan.jsp?PLAN_ID=4+TYPE_A=2 +START_TIME=2020-02-02+END_TIME=2003-02-02+STATE_B=2 +SEND_STAFF_ID=1+REV_STATE_ID=1+CONTENT=2+MEM=2+PROGRESS=0>修改</a>
[03-3-4 8:55:13:538 CST] 59ad70f0 SystemOut U <a href=ModifWorkingPlan.jsp?PLAN_ID=5+TYPE_A=2 +START_TIME=2002-02-02+END_TIME=2002-03-03+STATE_B=2 +SEND_STAFF_ID=0+REV_STATE_ID=0+CONTENT=22+MEM=2+PROGRESS=0>修改</a>
[03-3-4 8:55:13:558 CST] 59ad70f0 SystemOut U <a href=ModifWorkingPlan.jsp?PLAN_ID=11+TYPE_A=null+START_TIME=2002-01-01+END_TIME=2002-01-01+STATE_B=AAA+SEND_STAFF_ID=1+REV_STATE_ID=1+CONTENT=222+MEM=222+PROGRESS=0>修改</a>
[03-3-4 8:55:13:578 CST] 59ad70f0 SystemOut U <a href=ModifWorkingPlan.jsp?PLAN_ID=12+TYPE_A=null+START_TIME=2002-01-01+END_TIME=2002-01-01+STATE_B=AAA+SEND_STAFF_ID=2+REV_STATE_ID=3+CONTENT=qqq+MEM=qqq+PROGRESS=0>修改</a>
[03-3-4
回复
chenguoli 2003-04-04
向各位再请教一下
是这样的,因为有一个参数是一句话的内容,中间很容易出现空格
用这样方法传好象不行了
有没有其它的办法???????
回复
yun15291li 2003-04-03
定义个session就可以了。
不过我总觉得没有这个必要。
回复
icecloud 2003-04-03
str.replace(" ","+")
回复
whodsow 2003-04-03
我也遇到过,用'+'(加号)代替啊,是不个错的选择。
或者是“ ”也不错。
回复
bjzhanghao 2003-04-03
“有一个缺点就是&前遇到空格后面的参数就不能传了”,怎么会遇到空格呢,空格会自动转换为%20
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2003-04-03 09:33
社区公告
暂无公告