How to use struts2 submit tag as button without submitting the form?

前端 未结 2 1512
再見小時候
再見小時候 2020-12-09 21:22

I am using Struts2 framework in my application, I have one button on my JSP page. That is


2条回答
  •  难免孤独
    2020-12-09 21:33

    Have you tried preventDefault()?

    $("btnSave").click(function(e){
        e.preventDefault();   
        //..rest of the code
    });
    

提交回复
热议问题