一般情况下,在form标签中直接增加,如下
<FORM ACTION=“getpost.php” METHOD=“post”>但是,如果在请求过程中的url指定,该如何写呢,
src="../basis/areaView.action?areaId="+node.id+"&datestr"+d;
如果上面的语句要指定post方法提交,该怎么写呢

解决方案 »

  1.   

    不明白lz的意思,一个是php,一个是action,你到底在干啥
      

  2.   

    就是j2EE开发中,用js指定访问的url,但是要指定提交方式为post(默认为get)
      

  3.   

    document.getElementById("form");
    form.method="post";
    form.action="xxx.action?xxx="+xxx+"&xxx="+xxx;
    form.submit;
      

  4.   

    我是指定页面中的某个iframe的src到url,如下
    document.getElementById("main").src="../basis/areaView.action?areaId="+node.id+"&datestr"+d;
    <iframe id="main" src="../basis/areaView.action"></iframe>
      

  5.   

    貌似通过<a href="xxx"></a>或location.href="xxx",都是method="get"吧。。偶没试过。反正用struts1/2的话,都会执行execute。至于servlet的话,到底是doGet还是doPost就不清楚了。。