Инструменты пользователя

Инструменты сайта


playground:playground

PlayGround

usernametimes_paidtokens_in_treasury
test10690
aboba11

  • element: jsontable, path:

(null)(null)
dd

  • element: jsontable, path:

<script> fetch('/bot/nalog.json')

.then(response => response.json())
.then(data => {
  let table = '<table border="1"><tr><th>Имя</th><th>Очки</th></tr>';
  data.forEach(user => {
    table += `<tr><td>${user.name}</td><td>${user.points}</td></tr>`;
  });
  table += '</table>';
  document.getElementById('users-table').innerHTML = table;
})
.catch(err => {
  document.getElementById('users-table').innerHTML = 'Ошибка загрузки данных';
  console.error(err);
});

</script>

playground/playground.txt · Последнее изменение: Дима Виглес

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki