就是将页面提交
form1.submit();然后通过request.getParameter()获取提交的内容

解决方案 »

  1.   

    我給你一種思路:
    可以先定義 一個form<form name=form1>
    <input type=text name=t1>
    <input type=text name=t2>
    </form>再用javascript 去訪問form中的元素
    function aaa()
    { document.form1.t1.value='你要傳遞的變量'; //或者 document.forms[0].elements[0].value='你要傳遞的變量';  document.form1.t2.value='你要傳遞的變量2';////或者 document.forms[0].elements[1].value='你要傳遞的變量2';
    }再用javascript 實現提交
    function subm()
    {
    document.form1.action='提交到處理的網頁';
    document.form1.submit();
    }實現調用
    <input type=button onclick="aaa();">
    <input type=button onclick="subm();">
      

  2.   

    你建立个隐藏域,JAVASCRIPT传值进去。当刷新时取值
      

  3.   

    JAVASCRIPT
    document.location="a.jsp?sqlVal="+aval;
    JSP中:
    request.getParameter(sqlVal)
    方法不止以上几种,N种呀。