<input type="button" class="btn_grey" value="搜索1" onclick="window.location.href('customInfoAction.action?submitFlag=toList')"> 
action后面有个问号在发贴子的时候没写上.这样还是没法实现.

解决方案 »

  1.   

    如果想通过更改地址栏的方式来传递参数,建议使用javascript语句实现,同时将页面中的参数通过JavaScript加到地址栏后面,在使用Button的onclick事件

    <script language="javascript">
     function doSearch(){
     var type=document.getElementById("type").value;
     var key = document.getElementById("type").value;
     window.location="customInfoAction.action?submitFlag=toList&type="+type+"&key="+key;
    }
    <script><input type="button" class="btn_grey" value="搜索1" onclick="doSearch()"> 
      

  2.   

    跳转时,把参数一个个跟上,这样不太好
    最后存储在request内
      

  3.   

    <script language="javascript"> 
    function doSearch(){ 
    with(document.getElementById(form))
        action = "customInfoAction.action";
        method = "post";
        submit();

    <script> 
    这样就可以把表单的值传过去了