1<html>
2 <form id="myForm">
3 <input type="text" name="email" value="user@example.com">
4 </form>
5 <p id='text'></p>
6
7 <script>
8 window.setInterval(()=>{
9 var myForm = document.getElementById('myForm');
10 var text = document.getElementById('text');
11
12 text.innerText = myForm.elements['email'].value;
13 }, 1);
14 </script>
15</html>
1// return data in key value pair
2$('#form').serializeArray().reduce(function(obj, item) {
3 obj[item.name] = item.value;
4 return obj;
5}, {});