Guest User

JS

a guest
Feb 17th, 2019
99
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function appendOrders() {
  2.   var ElementOrders = document.getElementById("Orders")
  3.   ElementOrders.innerHTML = orders
  4. }
  5.  
  6. function appendEarnings(earnings) {
  7.   var ElementEarnings = document.getElementById("Earnings");
  8.   ElementEarnings.innerHTML = earnings
  9. }
  10.  
  11. function JSONLOAD() {
  12.   "use stric";
  13.  
  14.   fetch("Static/Data/DATA.json")
  15.     .then(function(resp) {
  16.       return resp.json();
  17.     })
  18.     .then(function(data){
  19.       var Earnings = data.DataInfo[0].Earnings;
  20.       appendEarnings(Earnings);
  21.       var Orders = data.DataInfo[0].Orders;
  22.       appendOrders(Orders)
  23.     })
  24. }
  25.  
  26. JSONLOAD()
RAW Paste Data