23.07.2020

What is javascript language. The JavaScript Programming Language: Information for Beginners. Connecting scripts to html document


JavaScript® (often abbreviated to JS) is an interpreted programming language designed to interact with web pages. JavaScript runs on the client side of the Internet and is used to program how web pages will behave when certain events occur.

What is JavaScript?

JavaScript is a cross-platform, object-oriented scripting language that adds interactivity and responsiveness to your web pages.

JavaScript allows the website developer to control how a web page behaves. This makes JavaScript fundamentally different from HTML, the language that is responsible for the structure of a web document, and CSS, the language that forms appearance web pages.

Programs written in JavaScript are called scripts. In the browser, they connect directly to the HTML document and, as soon as the page loads, they are immediately executed. The process of executing a script is called "interpretation".

If PHP script is being processed server side with using PHP interpreter, JavaScript is executed in the user's browser by the JavaScript interpreter.

Every browser today supports JavaScript, making it the language of the web.

V JavaScript browser can do everything related to manipulating the HTML document, interacting with the visitor and, with some restrictions, with the server:

  • Verify that custom HTML forms are filled out correctly.
  • Interact with your webcam, microphone and other devices.
  • Change the styles of HTML elements, hide, show elements, etc.
  • Display pop-ups and dialog boxes.
  • React visitor actions, handle mouse clicks, cursor movements, etc.
  • Send requests to the server and load data without reloading the page.

JavaScgipt is an incredibly powerful and efficient language that you should definitely try out!

JavaScript versus ECMAScript

This tutorial is written about a language known as JavaScript. However, the official standard that defines the specifications that describe the language calls it ECMAScript.

Netscape introduced Java language Script to Ecma International, an organization dedicated to the standardization of information and communication systems (ECMA was originally an acronym for the European Computer Manufacturers Association), where it was approved as an ECMAScript standard in 1997.

This standardized Java version Script, called ECMAScript, works the same in all applications that support the standard. Developers can use the open language standard to develop their own JavaScript implementation.

Formally, when developers refer to ECMAScript, they usually mean the "ideal" language as defined by the Ecma standard. Most often, these two concepts are used interchangeably. Therefore, when referring to the official standard, this tutorial will use the name ECMAScript, and in other cases, when referring to the language, JavaScript. The tutorial will also use the commonly used abbreviation ES5 when referring to the fifth edition of the ECMAScript standard.

JavaScript is not Java

Before you start learning JavaScript, you should understand that JavaScript is not Java. These are two completely different programming languages. JavaScript has nothing to do with the Java language, except for a similar syntax.

Java is an object-oriented programming language developed by Sun Microsystems since 1991 and officially released on May 23, 1995. Java is a powerful and much more complex programming language that can be used to write the most different programs... There is a special feature for Internet pages - writing applets.

An applet is a Java program that can be connected to HTML using the tag ... Javaapplets are run using the compiler. Java Applets are embedded in a web page, but are stored on disk as separate files. These are binaries, and if you open them, you will not see the source code for the applet.

JavaScript scripts are hosted within a web page and cannot exist separately from it. You don't need a compiler to execute JS scripts, they are executed by the browser on the user side. JS script is plain text and you can view the code with the naked eye - without any special software.

Java is a class-based language that is fast, highly secure, and reliable. Java's class-oriented model means that programs are composed exclusively of classes and their methods. Class inheritance and strong typing in the Java language typically require tightly coupled object hierarchies. These requirements make Java programming more complex than JavaScript programming.

JavaScript is a lightweight programming language that has simple syntax, specialized built-in functionality, and minimal requirements for creating objects. You don't need to declare variables, classes and methods. You don't need to worry about whether the methods are public, private, or protected, and you don't need to implement interfaces. JS script variables, parameters, and function return types are not explicitly typed.

What do you need to learn JavaScript?

No prior knowledge of JavaScript is required, but because JavaScript resides within and controls the dynamics of web pages, it is assumed that you are familiar with the basics of HTML, although the possibility of "parallel" and JavaScript is not ruled out.

Most JavaScript scripts are designed to "animate" HTML, that is, the purpose of the script is to demonstrate how the page will change when the HTML tag parameter values ​​change. Taken together and properly formatted, these kinds of scripts are an example of a web application developed.

Before we start writing the first JavaScript program, it is very important to take care in advance that all the necessary tools are configured and in place.

When learning JavaScript, it is very important to run the examples provided in each lesson, modify them, and then run them again to test your understanding of what you have learned. This requires a JavaScript interpreter. Fortunately, as you already know, any web browser includes a JavaScript interpreter.

To write and execute JavaScript programs, you just need to install any modern Internet browser (for example, Yandex, Internet Explorer, Mozilla Firefox, or Google Chrome).

You will see later in this tutorial that you can embed JavaScript code directly into HTML files, into tags


2021
maccase.ru - Android. Brands. Iron. news