当前位置: 代码迷 >> HTML/CSS >> Html:input的id值(type="button")怎么传递到一个Servlet中
  详细解决方案

Html:input的id值(type="button")怎么传递到一个Servlet中

热度:270   发布时间:2012-03-08 13:30:13.0
Html:input的id值(type="button")如何传递到一个Servlet中。
<input type="button" value="abc" id="id" onclick="window.location.href='OneServlet'" />
请问Servlet如何获取该id值。

感谢大家指教!急!!!

------解决方案--------------------
获取不好 可以是用input type = "hidden"
------解决方案--------------------
<input type="button" value="abc" id="id" onclick="window.location.href='OneServlet?param=' + document.getElementById('x').value" />
<input id=x>
  相关解决方案