开发者

JavaScript with servlet Get method

开发者 https://www.devze.com 2023-02-26 01:03 出处:网络
I have the following form element in JSP: <form name=\"testForm\" action=\"./test.do\" method=\"post\">

I have the following form element in JSP:

<form name="testForm" action="./test.do" method="post">
</form>

Now I want 开发者_Python百科to submit a form with a servlet get method using JavaScript.

Any help is appreciated.


Just change the method from post to get.

<form name="testForm" action="./test.do" method="get">
</form>

Now when it the form is submitted the data will be submitted using GET instead of POST params.

0

精彩评论

暂无评论...
验证码 换一张
取 消