Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var getHTML = function ( url, callback ) {
- if ( !window.XMLHttpRequest ) return;
- var xhr = new XMLHttpRequest();
- xhr.onload = function() {
- callback( this.responseText );
- }
- xhr.open( 'GET', url );
- xhr.responseType = 'text';
- xhr.send();
- };
- var q = function (question){
- getHTML("https://snowkk.pythonanywhere.com/?q=" + question, console.log)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement