Skip to content Skip to sidebar Skip to footer

URL Mapping Using Jquery In Spring Mvc

This somewhat confusing but it is my project requirement. I am using spring mvc and jquery. Now I have to post the form and expose the data to back end using ajax call of jquery fo

Solution 1:

When use <input type="submit" ..... /> it will submit your form according to your form action url. e.g something.html

So change the and add a click listener.

<input type="button" onclick="_submit()"/>

and your js would be

function _submit(){
    // submit your form via ajax.
}

This should submit your form with your specified url.

Thanks.


Post a Comment for "URL Mapping Using Jquery In Spring Mvc"