フィールド「lastname」からの値なしでajaxを使用して、フォーム内のフィールドからすべての値を送信したいのですが、どうすればそれを行うことができますか? 私のコード:
<script>
$(document).ready(function () {
$('#other').click(function () {
$.post("/Home/About", $("#target").serialize());
});
});
</script>
<form id="target" action="/Home/About" method="post">
First name:
<input type="text" name="firstname" id="firstname"><br>
.....other fields.....
Last name:
<input type="text" name="lastname" id="lastname"><br>
</form>
<div id="other">Submit</div>