Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
JavaDevTeam
notes
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
a0038e6705f99341d32ef28b834c8194f25c7d50
Breadcrumbs
notes
/
JavaSript
/
javascript-入门.js
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
53 lines (40 loc) · 1.14 KB
a0038e6
Breadcrumbs
notes
/
JavaSript
/
javascript-入门.js
Copy path
Top
File metadata and controls
Code
Blame
53 lines (40 loc) · 1.14 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--
--
--
--
--
--
--
--
--
--
--
--
--
--
JavaScript
-
入门
|
--
--
--
--
--
--
--
--
--
--
--
--
--
--
#
1995
年的脚本语言
,
是网景公司开发
#
最开始它的目的仅仅是为了作为
'浏览器表单校验'
而存在
#
JavaScript由三部分组成
ECMAScript
*
提供了核心的语言功能
*
是一个标准
,
Javascript实现了这个标准
*
Flash也实现了这个标准
文档对象模型
(
DOM
)
*
提供操作网页内容的方法和接口
浏览器对象模型
(
BOM
)
*
提供与浏览器交互的方法与接口
#
浏览器的支持
*
一般浏览器都支持了
ECMAScript
*
但是对于
DOM
和
BOM
有些差异
--
--
--
--
--
--
--
--
--
--
--
--
--
--
JavaScript
-
使用
|
--
--
--
--
--
--
--
--
--
--
--
--
--
--
#
JavaScript是一种解释形的脚本语言
#
在HTML中的JavaScript书写在
<
script
>
<
/
script
>
标签中
* 该标签可以放在任何地方
* 但是一般都是放在
<
head
>
标签之中
<
script
>
//代码
</
script
>
# 也可以由
<
script
>
标签引入JS的文件
<
script
src
=
"./xxx.js"
>
</
script
>
* 如果引入了脚本文件,那么该标签体中的JS代码将不会执行
* script 标签的属性
src
* 指定脚本文件的地址,可以跨域,可以是相对路径也可以是绝对路径
type
* 类型,一般都是:text/javascript
charset
* 字符集
defer
* 值为:fefer,意思是,延迟执行脚本
* 当整个页面都加载完毕后才会执行该脚本的代码
You can’t perform that action at this time.