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>
1-2 Internal reference
1-3 External reference