JavaScript gives HTML designers a programming tool,JavaScript can react to events,JavaScript can read and write HTML elements,JavaScript can be used to vilidate data,JavaScript can be used to detect the visitor's browser,JavaScript can be used to create cookies
The THML <script> tag is used to insert a JavaScript into an HTML page.
Browsers that do not support JavaScript,will display JavaScript as page content
JavaScript can be put in the <body> and in the <head> sections of an HTML page
execute <body> sections when page loading,and <head> sections will be executed when call it.
JavaScript can also be placed in external files
External JavaScript files often contain code to be uses on several different web pages.
External JavaScript files have the file extension .js
External script cannot contain the <script></script> tags
To use an external script,point to the .js file in the "src" attribute of the <script> tag.
create cariables in JavaScript is most often referred to as "declaring" cairables,you declare JavaScript variables with the var keyboard
JavaScript Popup Boxes
JavaScript has three kind of popup boxes:Alert box,Confirm box,and Prompt box
Alet Box: An alert box is often used if you want to make sure information comes through to the user.When an alert box pops up,the user will have to click "OK" to proceed. alert("sometext");
The for...in statement loops through the properties of an object
By using Javascript,we have the ability to create dynamic web pages,Events are actions that can be detected by JavaScript.Every element on a web page has certain events which can trigger a Javascript.
JavaScript學習
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
JavaScript核心原理解析
wy53780
2020-04-23 14:02:41
再学JavaScript ES(6-10)全版本语法大全
wy53780
2020-04-23 13:58:55
前端埋点 - 报错监控
mriliujy
2019-07-11 16:14:54
JavaScript ES2019 中的 8 項新功能
前端高達
2019-02-24 13:48:04
用JavaScript刷新框架子頁面的方法
princesstor015
2019-02-23 13:37:36
分享Javascript開發經驗
yuncash
2019-02-23 13:25:11
AJAX入門教程理解JavaScript中的函數
剛剛
2019-02-23 12:57:19
深度解析JavaScript事件對象之信用盤源碼出售
yihujiu
2019-02-23 12:54:46
JavaScript 圖片滑動切換效果
53856943
2019-02-23 00:35:22
JavaScript 無縫上下左右滾動加定高定寬停頓效果
53856943
2019-02-23 00:35:18
起點沒有選對,想找好的前端工作只能越找越累
麪包理想
2019-02-23 00:25:54
css佈局簡史與決勝未來的第四代css佈局技術
麪包理想
2019-02-23 00:25:51
jquery 或者說javascript中的加法運算
wanqiufeng
2019-02-23 00:19:36
【玖哥亂彈】編程語言間的鬥爭
東風玖哥
2019-02-23 00:10:03
【玖哥亂彈】神通廣大的JavaScript
東風玖哥
2019-02-23 00:07:32