< jQuery
jQuery - Űrlap sorosítása
Űrlap
<form id="signupForm" action="signupsub.html">
<label for="user">Felhasználónév</label>
<input type="text" id="user" name="user">
<br>
<label for="email">E-mail</label>
<input type="email" id="email" name="email">
<br>
<label for="pass">Jelszó</label>
<input type="password" id="pass" name="pass">
<br>
<label for="confirm_pass">Jelszó újra</label>
<input type="password" id="confirm_pass" name="confirm_pass">
<br>
<button>Regisztrál</button>
</form>
$('#signupForm').on('submit', event =>{
let data = $('#signupForm').serializeArray();
console.table(data);
event.preventDefault();
});
Űrlap fieldset elemmel
jQuery
$('#signupForm').on('submit', event =>{
let data = $('#basedata').serializeArray();
console.log('megy');
console.table(data);
event.preventDefault();
});