What is wrong with my html code it is not working when i execute in chrome or ie
ID: 3747777 • Letter: W
Question
What is wrong with my html code it is not working when i execute in chrome or ie?
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Milestone 1</title>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js">
</script>
</head>
<body>
<div id="itEbooks">
<p>Sample Data:</p>
</div>
</body>
<script>
//fetches information about a specific book
var bookData;
$.ajax({
url: "https://openlibrary.org/api/books?bibkeys=ISBN:0201558025,LCCN:93005405&format=json&jscmd=data "
}).done(function(data) {
var bookData = data;
$('#itEbooks').append(bookData.id);
});
</script>
</html>
Explanation / Answer
If you have any doubts, please give me comment...
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Milestone 1</title>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js">
</script>
</head>
<body>
<div id="itEbooks">
<p>Sample Data:</p>
</div>
</body>
<script>
//fetches information about a specific book
var bookData;
$.ajax({
url: "https://openlibrary.org/api/books?bibkeys=ISBN:0201558025,LCCN:93005405&format=json&jscmd=data "
}).done(function(data) {
for (var book in data) {
$('#itEbooks').append("<p>" + data[book].title + "(" + book + ")<p>");
}
});
</script>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.