What is JavaScript?
- JavaScript is designed to add interactive behavior to HTML pages.
- JavaScript is a scripting language (the scripting language is a lightweight programming language).
- JavaScript consists of several lines of executable computer code.
- JavaScript is usually embedded directly into an HTML page.
- JavaScript is an explanatory language (that is, code execution is not precompiled).
- All people can use JavaScript without having to purchase a license.
are Ava and JavaScript the same?
Different!
In terms of concept and design, Java and JavaScript are two completely different languages.
Java (developed by Solar Micro systems) is a powerful and more complex programming language, like the same level of C and C + +.
What can JavaScript do?
-
JavaScript provides a programming tool for HTML designers
-
HTML creators are often not programmers, but JavaScript is a scripting language with a very simple syntax! Almost everyone has the ability to put short snippets of code into their HTML pages.
-
JavaScript can put dynamic text in an HTML page
-
A piece of JavaScript that resembles this can put a variable piece of text in an HTML page: document.write ("
-
JavaScript can respond to events
-
JavaScript can be set to be executed when an event occurs, such as when a page is loaded or when a user taps an HTML element.
-
JavaScript can read and write HTML elements
-
JavaScript can read and change the contents of HTML elements.
-
JavaScript can be used to validate data
-
JavaScript can be used to validate data before it is committed to the server.
-
JavaScript can be used to detect visitors ' browsers
-
JavaScript can be used to detect the visitor's browser and load the corresponding page for the browser based on the detected browser.
-
JavaScript can be used to create cookies
-
JavaScript can be used to store and retrieve information that resides on a visitor's computer.
JavaScript Basic Understanding