serialize and send form data jquery ajax
$.ajax({
type : 'POST',
url : 'url',
data : $('#form').serialize()
}
serialize and send form data jquery ajax
$.ajax({
type : 'POST',
url : 'url',
data : $('#form').serialize()
}
get serialize data javascript
// HTML
<form id="myForm" name="myForm">
<div>
<label for="username">Enter name:</label>
<input type="text" id="username" name="username">
</div>
<button type="button" onclick="clickMe()">Click</button>
</form>
// JS
function clickMe(){
let myForm = document.getElementById('myForm');
let formData = new FormData(myForm);
console.log(formData.get('username'));
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us