js(一)

介绍

  • 脚本语言,解释型语言
  • 定义网页的动态行为

使用

1、script标签内

<script>
alert("hello");
</script>

2、script标签引入

<script src="x.js"></script>

3、伪js

<a href="javascript:alert('hello')">点击</a>

按我的理解,js分作两部分:BOM和DOM,方法、变量与运算。

原文地址:https://www.cnblogs.com/heibaimao123/p/13802513.html