<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>JS, HTML, CSS サンプル</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
      background-color: #f0f0f0;
    }

    button {
      padding: 10px 20px;
      font-size: 16px;
      cursor: pointer;
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 5px;
      transition: background-color 0.3s;
    }

    button:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>
  <button onclick="changeBackgroundColor()">クリックして色を変える</button>

  <script>
    function changeBackgroundColor() {
      // ランダムな色を生成して背景色を変更
      const randomColor = `#${Math.floor(Math.random()*16777215).toString(16)}`;
      document.body.style.backgroundColor = randomColor;
    }
  </script>
</body>
</html>
