What is js?
This programming language is called a script. They can be written in HTML and executed automatically when a page is being loaded.
Scripts exist and execute as plain text. They can run without special preparations or compilation.
- insert a new HTML in a webpage, modify contents and styles of an existing webpage;
- respond to user actions, mouse clicks or movements, and keyboard strokes;
- send network requests to a remote server to download or upload files (so-called AJAX and COMET technologies);
- get or modify cookies, ask questions and send messages to visitors;
- remember client's data (local storage).
Examples of these restrictions are:
- Different browser tabs are basically unrelated to each other.
But the ability to get data from the server of other websites/domains is limited.
Although this is possible, it requires explicit protocol (in HTTP headers) from the remote server.
This is also for the user's data security.
+ Full integration with HTML/CSS.
+ Use simple tools to accomplish simple tasks.
+ Supported by all