var request = new XMLHttpRequest();
request.open("POST", "/ss/js/sender.php");
request.onload = function() {
console.log(request.status);
console.log(request.statusText);
console.log(request.responseText);
};
request.onerror = function() {
console.log(request.status);
console.log(request.statusText);
console.log(request.responseText);
};
request.send(formData);
var form = document.forms.sss,
elms = form.querySelectorAll('input'),
skipElms = ['bbb', 'aaa'];
elms.forEach(function(el) {
var skipThis = false;
skipElms.forEach(function(name) {
if (el.name === name) {
skipThis = true;
return;
}
});
if (!skipThis) {
el.value = '';
}
});