Answer the question
In order to leave comments, you need to log in
How to parse via XMLHttpRequest?
How to get the element I need from the page?
var xhr = new XMLHttpRequest();
xhr.open('GET', '/change_pw', false);
xhr.onload = function () {
hash = document.getElementsByName("hash")[0].value.innerHTML = xhr.responseText;
};
xhr.send();
alert(xhr.hash);
<input type="hidden" name="hash" value="9f396fe44e7c05c16873b05ec425cbad">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question