Created
April 23, 2018 03:25
-
-
Save kenmazaika/b7e9d0da3ffe256c986fd28fed035af2 to your computer and use it in GitHub Desktop.
This file contains 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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> | |
<h1 id="headline">Hi Karla</h1> | |
<button id="btn">Click me!!!</button> | |
<script> | |
// var movieName = "Sharknado"; | |
// var apiKey = "4ce5edcc"; | |
// var queryURL = "http://www.omdbapi.com/?t=" + movieName + "&apikey=" + apiKey; | |
// $.ajax({ | |
// url: queryURL, | |
// method: "GET" | |
// }).done(function(response) { | |
// var actors = response.Actors; | |
// $('#headline').text(actors); | |
// }); | |
$('#btn').click(function() { | |
var movieName = "Sharknado"; | |
var apiKey = "4ce5edcc"; | |
var queryURL = "http://www.omdbapi.com/?t=" + movieName + "&apikey=" + apiKey; | |
$.ajax({ | |
url: queryURL, | |
method: "GET" | |
}).done(function(response) { | |
var actors = response.Actors; | |
$('#headline').text(actors); | |
}); | |
// console.log("hi"); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment