日期:2014-05-18  浏览次数:20593 次

URL传文本框的值

<tr>

<td> <input   name= "password "   type= "text "   value= " <%=user.getPassword()%> "   size= "7 "/> </td>
<td> <a   href= " <%=request.getContextPath()%> /xiugai.do?method=xiugaiUser&amp;userId= <%=user.getId()%> &amp;password= "+password+ "> 修改 </a> </td>
</tr>

------解决方案--------------------
用js.
var password = document.getElementByTagName( "password ")[0].
或者var password = document.getElementById( "password ");(给password定义个id-- "password ");
然后就用document.URL = " <%=request.getContextPath()%> /xiugai.do?method=xiugaiUser&userId= <%=user.getId()%> &password= "+password;
修改上面就用onclick事件触发就行了