You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
738 B
738 B
Javascript - AJAX
Lesson Objectives
- Explain AJAX
- Demonstrate jQuery AJAX
- Explain promises
- Explain Cross Site AJAX
- Explain JSONP
- Explain CORS
Explain AJAX
Demonstrate jQuery AJAX
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>
hi
<script type="text/javascript">
$(function(){
$.ajax({
url:'http://www.omdbapi.com/',
method: "GET",
data: { s: "star wars" },
success: function(data, status, jqXHR){
console.log(data);
},
error: function(jqXHR, status, error){
console.log('bad');
}
});
});
</script>
</body>
</html>