日期:2014-05-20  浏览次数:20715 次

传递参数问题
用超级连接传递HTML标签值到struts
比如:<input type="text" name="pageValue" size="3" style="margin-top: 2px"></input>

用这个连接传递:<a class="easyui-linkbutton" plain="true" href="authoritydirlist?pageSize=2">GO</a>

------解决方案--------------------
href="authoritydirlist?pageSize=2" 这样可以啊 怎么了?用request.getParameter();

或者在<a>里面写一个onclick事件 方法里面写submit 然后form里面写个hidden
------解决方案--------------------
HTML code

<script>
  function a(){
    var s = document.getElementByName("pageValue");
    window.location = "authoritydirlist?pageSize=2" + s;
  }
</script>

<input type="text" name="pageValue" size="3" style="margin-top: 2px"></input>
<a class="easyui-linkbutton" plain="true" href="#" onclick="a()">GO</a>