Multiple submit buttons in the same form calling different Servlets

后端 未结 6 1544
梦毁少年i
梦毁少年i 2020-11-29 02:11

First, here is the code:

Last Name: &l
6条回答
  •  眼角桃花
    2020-11-29 02:47

    You may need to write a javascript for each button submit. Instead of defining action in form definition, set those values in javascript. Something like below.

    function callButton1(form, yourServ)
    {
    form.action = yourServ;
    form.submit();
    });
    

提交回复
热议问题