Submit HTML Form with ajax and different HTTP verb
<!DOCTYPE html>
<html>
<head>
<title>TestPage</title>
</head>
<body>
<form>
<input type="text" name="a" value="1" id="a" />
<input type="submit" name="g" value="Submit" id="g" />
</form>
</body>
</html>
$(function () {
$('form').submit(function () {
$.ajax({
url: '/simpleTest.htm',
type: 'PUT',
data: $('form').serialize(),
success: function (data) {
alert("asdc");
}
});
return false;
});
});