mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 21:34:06 -06:00
vault backup: 2022-07-26 14:08:14
This commit is contained in:
parent
d7fb870cc1
commit
b85868bc5a
@ -9,4 +9,34 @@ tags:
|
||||
# Javascript
|
||||
## DOM
|
||||
- JS can access and change all the elements of an HTML document
|
||||
- When a webpage is loaded, the brow
|
||||
- When a webpage is loaded, the browser creates a DOM of the page
|
||||
- The HTML DOM model is contructed as a tree of Objects
|
||||
|
||||

|
||||
|
||||
JS can:
|
||||
- change elements
|
||||
- change attributes
|
||||
- change styles
|
||||
- remove elements
|
||||
- add new elements
|
||||
- react to events
|
||||
- create new events
|
||||
|
||||
JS is
|
||||
- descriptive
|
||||
- structued
|
||||
- interpreted
|
||||
|
||||
can be linked externally
|
||||
- `<scipt src="script.js" defer></script>`
|
||||
- `defer` ensures that the js is loaded after the html (in a specific order)
|
||||
- `async` ensures that the js is run as soon as it is loaded (not in a specific order)
|
||||
|
||||
typing
|
||||
- js is dynamically typed
|
||||
- you dont need to specify the type of variable
|
||||
|
||||
events
|
||||
- e.g., click, hover, etc
|
||||
-
|
||||
Loading…
Reference in New Issue
Block a user