]> iEval git - gruntmaster-page.git/blob - js/90-form.js
Change font-size for readable to 14px
[gruntmaster-page.git] / js / 90-form.js
1 $(function(){
2 let result = $('#result')[0];
3 $('.jsform > input[type="submit"]').on('click', e => {
4 let form_data = new FormData(this.parentElement);
5 let form = this.parentNode;
6 let xhr = new XMLHttpRequest();
7 xhr.open(form.getAttribute('method'), form.getAttribute('action'));
8 xhr.onload = () => result.innerHTML = this.responseText;
9 xhr.onerror = () => result.innerHTML = 'Error!';
10 window.scrollTo(0, 0);
11 result.innerHTML = 'Loading...';
12 xhr.send(form_data);
13 e.preventDefault();
14 });
15 });
This page took 0.050382 seconds and 4 git commands to generate.