Home > Web Front-end > JS Tutorial > body text

[javascript learning] js syntax basics

php是最好的语言
Release: 2018-08-08 16:42:55
Original
4435 people have browsed it

This article systematically organizes the grammar of JavaScript. The knowledge points are very complete and basic. It can be used as a reference when studying. The review is also very systematic. There is no need to read books. The knowledge points in the books are very scattered. After reading them It's a waste of time. If you don't mind it, you can save it for future reference. Being helpful to everyone is my motivation to continue writing articles. I am also happy to share my knowledge with everyone.

1-1 The starting point for learning JavaScript is to process web pages. We first learn how to use DOM for simple operations.

<body>
  <p id="p1">我是第一段文字</p>
  <p id="p2">我是第二段文字</p>

  <script type="text/javascript">
    document.write("hello");  # 输出文本
    document.getElementById("p1").style.color="blue";  # 第一段文字变蓝色了
  </script>
</body>
Copy after login

1-2 Internal reference

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!