document.getElementById('submitBtn').addEventListener('click', function() {
var username = document.getElementById('username').value;
var xhr = new XMLHttpRequest();
xhr.open('POST', 'process.php', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
document.getElementById('response').innerHTML = xhr.responseText;
}
};
xhr.send('username=' + encodeURIComponent(username));
});