Can I make a not submit a form?

I’ve got a form, with 2 buttons <a href=”https://stackoverflow.com/questions/3314989/index.html”><button>Cancel changes</button></a> <button type=”submit”>Submit</button> I use jQuery UI’s button on them too, simply like this $(‘button’).button(); However, the first button also submits the form. I would have thought that if it didn’t have the type=”submit”, it wouldn’t. Obviously I could do this $(‘button[type!=submit]’).click(function(event) { event.stopPropagation(); }); But … Read more