转发问题?

qfqufeng 2002-05-29 02:20:29
小弟的目的是要在jsp中接受参数后又一个传发功能
我是这么写的
<%String tablename = (String)session.getAttribute("table");
%>
<input type=hidden name = tablename value = <%=tablename%>>
<script language="JavaScript">
function sg(gid){
if(document.tablename.value == "document_receive")
{location="http://localhost:8080/document/updatedocument_receive.jsp?id="+gid;}

if(document.tablename.value == "document_send")
{location="http://localhost:8080/document/updatedocument_send.jsp?id="+gid;}
}
如次调用out.println("<TD><A href=javascript:sg('"+j+"')>"+s+"</A></TD>");

可是结果不对
给个理由?
...全文
36 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
qfqufeng 2002-05-29
  • 打赏
  • 举报
回复
没有效果,还是没有反应
qiushuiwuhen 2002-05-29
  • 打赏
  • 举报
回复
<input type=hidden name=tablename value="<%=tablename%>">


document.tablename.value
=>
document.all.tablename.value
孟子E章 2002-05-29
  • 打赏
  • 举报
回复
function sg(gid){
if(document.formname.tablename.value == "document_receive")
{window.location="http://localhost:8080/document/updatedocument_receive.jsp?id="+gid;}
}

87,996

社区成员

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

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