-
Notifications
You must be signed in to change notification settings - Fork 0
/
file54.html
33 lines (32 loc) · 849 Bytes
/
file54.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<iframe id="img-of-the-day"
width="560" height="315" frameborder="0" allowfullscreen></iframe>
<script>
let query = 'https://api.nasa.gov/planetary/apod?api_key=7fc7zVOJdonBJ3O4sD0BzQ3Znz4dRz8SqTBl4h0w';
let request = new XMLHttpRequest();
request.open('GET', query);
request.onload = function() {
if (request.status === 200) {
let response = JSON.parse(request.responseText);
document.getElementById('img-of-the-day').setAttribute('src', response.url);
}
};
request.send();
</script>
<html>
<body>
<br>
<select>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<br>
Author: <input type="text">
<br>
Feedback: <textarea></textarea>
<br>
<button type="submit" >Comment</button>
</body>
</html>