JavaScript is a cross-platform,object-oriented programming language.It is a small and lightweight language.
Client Side || Server Side
Javascript is all about making content of web document dynamic.
- Provides HTML designers a programming Tool
- Can put dynamic test into HTML/ read and write in html documents
- Can react to events
- can be used to validate data
- .......
- Angular*JS
- ReactJS
- NodeJS
- VueJS
- EmberJS
- MeteorJS
- Boolean
- Null
- Undefined
- Number
- String
- Objects
- Everything is case sensitive
- variables are loosely typed
// integer var a = 10; // string var favoriteColor = "red"; // boolean var canDriveCar = false;
- var keyword is used
- variables need not have to be declared before using
- application programming interface(API) for valid HTML documents.It defines the logical structure of documents and the way a document is accessed and manipulated.
- A web page is a document
- DOM provides the way to represent,store and manipulate the document(web page).
- Object Oriented representation of web page
- DOM is not a programming language
- document.getElementById(“id”)
- document.getElementsByTagName(name)
- document.getElementsByClassName(name)
- document.createElement(name)
- parentNode.appendChild(node)
- element.innerHTML
- element.style.*
- element.setAttribute(attribute,value)
- element.getAttribute
- element.addEventListener
- document.appendChild(element)
- document.replaceChild(element)
- document.write(text)