Guest User

Untitled

a guest
Nov 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5.  
  6. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  7.  
  8. </head>
  9.  
  10. <body>
  11.  
  12. <script>
  13. var data = [{
  14. "name": "Bebe",
  15. "lastname": "Rexha",
  16. "description": "Young and beautiful",
  17. "producer": "ABC Music",
  18. "users_name": "BebeLove",
  19. },
  20. {
  21. "name": "Katy",
  22. "lastname": "Perry",
  23. "description": "Cute and sweet",
  24. "producer": "Kitty Music",
  25. "users_name": "KittyCat",
  26. },
  27. ]
  28.  
  29. var htmlText = '';
  30.  
  31. for ( var key in data ) {
  32. htmlText += '<div class="div-conatiner">';
  33. htmlText += '<p class="p-name"> Name: ' + data[key].name + '</p>';
  34. htmlText += '<p class="p-loc"> LastName: ' + data[key].lastname + '</p>';
  35. htmlText += '<p class="p-desc"> Description: ' + data[key].description + '</p>';
  36. htmlText += '<p class="p-created"> Produced by: ' + data[key].producer + '</p>';
  37. htmlText += '<p class="p-uname"> Username: ' + data[key].users_name + '</p>';
  38. htmlText += '</div>';
  39. }
  40.  
  41. $('body').append(htmlText);
  42.  
  43. </script>
  44.  
  45. </body>
  46. </html>
Add Comment
Please, Sign In to add comment