Good morning, I am geting html of another page by AJAX:
var xml = new XMLHttpRequest()
xml.onreadystatechange = function () {
if (xml.readyState == 4) {
// here I need to work with data
// xml.responseText
}
}
xml.open("GET", url, false);
xml.send(null)
How I can apply querySelectorAll() to html content of another page?
You could create new document and put
responseText
into it. Then you can usequerySelectorAll()
. Here is youronreadystatechange
function: