-1
So I have a question here. I needed to take the data related to a form and send to my Ajax automatically (in a structured way), without pressing any Ubmit button or using an onClick function.
I built my code like this
<form id="ladologin">
<input id="acesso" name="acesso" value="#acesso">
<input id="senha" name="senha" value="senha">
<script>
var form = document.getElementById("ladologin");
var formData = new FormData(form);
console.log(form):
//console.log(formData):
</script>
</form>
my console returns an error while trying to recover the form data
Uncaught SyntaxError: Unexpected token :?token=R1H7-9X-GAZ3:11 Uncaught SyntaxError: Unexpected token :
Does anyone have any idea how to solve?
"keyup" or "keydown" functions can help you with this
– Walter Felipe