Created
August 9, 2019 07:38
-
-
Save ravgeetdhillon/b02a5c2522ce06d23ceca846c55322c7 to your computer and use it in GitHub Desktop.
Parsing HTML received from AJAX request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ajax = new XMLHttpRequest(); | |
ajax.onreadystatechange = function() { | |
if (ajax.status == 200 && ajax.readyState == 4) { | |
var answer = document.createElement( 'html' ); | |
answer.innerHTML = ajax.responseText; | |
console.log(answer.querySelector('.language-python').innerHTML); | |
} | |
} | |
ajax.open("GET", "/docs/language-bindings/python", true); | |
ajax.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment