首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

jsp 其间传值

2012-11-01 
jsp之间传值在index.jsp 1.url传参数数 ? ? a? ?href ../index1.jsp?keyword &apos你好 &apos /

jsp 之间传值

在index.jsp

1.url传参数数
? ? <a? ?href= "../index1.jsp?keyword= &apos;你好 &apos; "/ >
2.采用session? ?或request


<%
? ? session.setAttribute( "keyword ", "你好 &apos; ")
% >在index1.jsp

在index1.jsp
1.
<%
? ?? ?String? ?keyword? ?=? ?reuqest.getparamer( "keyword ");
% >
<input? ?type= "text "? ?value= <%=keyword% > >

2.
<%
? ?? ?String? ?keyword? ?=? ?session.getAttribute( "keyword ");
% >
<input? ?type= "text "? ?value= <%=keyword% > >

热点排行