Jquery to change form action -


I have two buttons in one form and two separate pages should be clicked when they are clicked. When button 1 is clicked, page 1 should load and when button 2 is clicked, Page 2 should be loaded. I know how this is done in javascript but I have no clue about how to do this in jquery. Can anyone help me?

try this:

  $ ('# button1'). Click (function () {$ ('# formId'). Attr ('action', 'page1');}); $ ('# Button2') Click (function () {$ ('# formId'). Attr ('action', 'page2');});    

Comments