Advertisement
Nahid8195

html

Jul 31st, 2021
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. </head>
  6. <body>
  7. <u1 id="albums"></u1>
  8. <script src= "https://unpkg.com/axios@0.21.1/dist/axios.min.js"></script>
  9. <script>
  10. axios.get('https://jsonplaceholder.typicode.com/albums')
  11. .then(function(res){
  12. res.data.forEach(x=1{
  13. document.getElementbyID('albums').innerHTML += '<li>' + x.name + '<li>';
  14.  
  15. });
  16. })
  17. .catch(function(err){
  18. console.log(err);
  19.  
  20. })
  21. </script>
  22.  
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement