iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 9
0
Modern Web

JavaScript 30系列 第 9

JavaScript 30 #09 - Dev Tools Domination

Practice on Console method in dev tool

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Console Tricks!</title>
</head>
<body>

  <p onClick="makeGreen()">×BREAK×DOWN×</p>

  <script>
    const dogs = [{ name: 'Snickers', age: 2 }, { name: 'hugo', age: 8 }];

    function makeGreen() {
      const p = document.querySelector('p');
      p.style.color = '#BADA55';
      p.style.fontSize = '50px';
    }

    // Regular

    // Interpolated

    // Styled

    // warning!

    // Error :|

    // Info

    // Testing

    // clearing

    // Viewing DOM Elements

    // Grouping together

    // counting

    // timing

  </script>
</body>
</html>


上一篇
JavaScript 30 #08 - Fun with HTML5 Canvas
下一篇
JavaScript 30 #10 - Hold Shift and Check Checkboxes
系列文
JavaScript 3010

尚未有邦友留言

立即登入留言