Показать сообщение отдельно
  #7 (permalink)  
Старый 22.08.2019, 12:30
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,064

Vikal,
<!DOCTYPE html>

<html>
<head>
  <title>Untitled</title>
  <meta charset="utf-8">
  <style type="text/css">
  .hide{
      display: none;
  }
 </style>
 <script>
addEventListener("DOMContentLoaded", function() {
    const tables = document.querySelectorAll("table.hide"),
          table = tables[tables.length * Math.random() | 0];
          table.classList.remove("hide");
})

 </script>

</head>

<body>
<table class="hide">
    <tr>
        <td>1</td>
    </tr>
</table>
<table class="hide">
    <tr>
        <td>2</td>
    </tr>
</table>
<table class="hide">
    <tr>
        <td>3</td>
    </tr>
</table>
<table class="hide">
    <tr>
        <td>4</td>
    </tr>
</table>
<table class="hide">
    <tr>
        <td>5</td>
    </tr>
</table>

</body>
</html>
Ответить с цитированием