Web scripts are programs that are written directly in html code or simply in files, which is more preferable. These programs are written in JavaScript. Thus, speaking of what Javascripts is, we can say that it is a programming language that is interpretive.

Java Script is read by the browser, and then written expressions are executed and manipulations are performed that are set on the page. JavaScript is similar in syntax to programming languages ​​like Java, C ++, and C.
JavaScript owes its appearance to the development of companies such as Sun Microsystems (Oracle) and Netscape (Mozilla). The original name of the language was LiveScript. However, due to the fact that the Java language from Sun Microsystems was very popular at that time, Netscape's marketing department decided to change the name of the language to JavaScript. There was a calculation that this step would add popularity to the language. Also, speaking about what Javascripts is, it should be noted that Java and JavaScript are two different languages.
ECMA-262 is the official standard for this language. The name of this JavaScript language is ECMAScript.
To learn this language, previous knowledge about CSS and Html is useful. If even before this point you did not know about CSS and Html, then you should immediately read it.
JavaScript limitations and features
The following features appear when using scripts [removed] on web pages:
- Adding various animated effects that cannot be implemented using HTML and CSS.
- Ability to change the content of HTML elements and add new tags without reloading the page.
- Responding to events (responding to user actions) - processing keystrokes on the keyboard and moving the mouse cursor.
- Performing verification of data that was entered in the form fields before sending to the server. This reduces the load on the server and speeds up the site.
- Determining the browser version and loading the desired page, depending on this.
This is not a complete list of the scripting possibilities that were written in this language; JavaScript functions have a much broader meaning.
In addition to the above features, there are limitations to using the scripts:
- There is no access to files that are located on the user computer. In general, there is no access outside the web page itself. The only exceptions are cookies that can be read and written using JavaScript. Objects of this type are usually needed only to make the page load faster.
- It is not possible to perform cross-domain requests, that is, gaining access to web pages that are on another domain, even if they are open in neighboring tabs.
- There is no way to close the tabs and windows that opened with it.
- There is no way to protect the source text on the page and prohibit copying images or text from the page. At the same time, it remains possible to add some restrictions that allow JavaScript functions.
In some ways, such restrictions make it difficult to execute malicious code.
What are javascripts?
As noted above, JavaScript is a language that makes web pages interactive. Using this language, those applications are created that are included in the HTML code. For example, forms or registration forms completed by the user. JavaScript is often confused with Java, but there is little in common between these languages.
Some even compare JavaScript with other Ruby, Self, Python languages. But this is a separate language.
Using javascript
Using JavaScript, you can make changes to the page, change the styles of elements, add or remove tags. It is also possible to learn about your user actions on the page (decrease or increase the working area of ​​the screen, clicks with the mouse, pressing any keys, scrolling the page). It is possible to access and manipulate any element of the HTML code. Thus, the answer to the question "What are JavaScripts?" will be able to download data without reloading the page, entering messages, setting or reading cookies and many other actions.
The basis of JavaScript uniqueness
The main uniqueness of this language is that it has support for almost all browsers and has full integration with them. All actions using JavaScript are very simple. There is no other technology that incorporates all of these benefits. For example, there are no cross-browsers; they are not supported by all browsers (these are XUL, ActiveX, VBScript). There are also those that are not fully integrated with the browser. This is Silverlight, Flash, Java. At the moment, a great development of this technology is underway and JavaScript 2 elements are under development.
Alternative programming languages
It happens that JavaScript features are limited. In this case, the following programming languages ​​will help.
Java
The most used language is Java. This language describes complex algorithms, but this is not always required on a regular site. For this reason, java-applets are loaded for a long time and have a considerable amount.
Flash
From the very beginning, the Flash language was designed as a cross-browser language for creating multimedia objects. For example, to create interactive areas on the site, games, banners, players for audio and video. Among other things, using Flash to create sockets (network connections), you can work with multimedia, store objects that do not need to send requests to the server. There are handy graphical development tools for Flash.
If we compare the disadvantages of Flash and JavaScript, whose objects are very different, then the main disadvantage of Flash is its poor indexing by search engines. This is because search engines follow Html links. Also, it is not possible to select text that is in the Flash container.
Silverlight, Vbscript, JavaFX, XUL
In order to complement the capabilities of JavaScript in the construction of interfaces and the field of communication, Silverlight, Vbscript, JavaFX, XUL technologies are used.
They are still used more rarely than Flash and JavaScript. To highlight the features of each of them, we can say the following:
- XUL - used when describing desktop applications and interfaces. But it is only possible if you create a program for Mozilla.
- JavaFX - runs on a computer only with Java, as it is an addition to this language.
- Vbscript - was developed by Microsoft Corporation. The basis was Visual Basic. This language does not develop in any way, today it is almost never used, and inferior in terms of capabilities to JavaScript.
Silverlight - was developed by Microsoft as a competitor for Flash. It also does not have much popularity, because JavaScript strings can provide much more page scripting.
How to enable javascript and what is javascript error
Now it’s worth discussing the everyday problems of users on the network. Today it increasingly happens that a user after visiting his page in the social. the network sees in the upper window the error message "JavaScript is not enabled", "For the site to work properly, enable JavaScript", "JavaScript error". How to fix this is a serious question, because at the same time, there are difficulties with downloading videos and photos from the user.
How JavaScript is Enabled in Mozilla Firefox
If the user works in Mozilla, you need to go to "Tools", then to "Settings". Then, on the “Content” tab, check the box next to “Use JavaScript”.
How JavaScript is included in Google Chrom
To enable or disable JavaScript in this browser, the following sequence of actions is required: “Configuring and managing Google Chrom”, “Settings”, “Advanced”, “Personal data (content settings)”, “JavaScript”. Allow all sites to use JavaScript (recommended).
How JavaScript is enabled in Opera
To enable or disable JavaScript in this browser, do the following:
- Press the F12 key.
- Select “Enable JavaScript”.
How JavaScript is enabled in IE ("Internet Explorer")
To enable or disable JavaScript in the "Internet Explorer", you need to do the following: "Service", "Internet Options", the "Security" tab, "Select the Internet zone", the "Other" button, the "Scripts" item, "Allow scripts".
JavaScript in VK
The extremely popular VKontakte social network in the CIS often presents unpleasant surprises. Increasingly, VKontakte users complain about the inability to listen to audio or the inability to watch video.
To solve this problem, you need to fix the JavaScript error on the VKontakte network.
What is JavaScript VK error?
The user visited his page on the social network and tried to run a video or audio file, but after that he found in the upper left corner the inscription “JavaScript error: initAddMedia is not defined”. This message appears when an error occurs.
"[Removed] initAddMedia."
Methods for solving the problem with an error on the VKontakte social network:
- First you need to go to the "Start", "My Computer" and the Windows folder. Then go to the system32 section and to the driver folder. Then to the folder etc.
- Among the small number of files in this folder, you need to select the hosts file.
Then this file is opened using Notepad. It looks like this: you need to right-click on the hosts file and select "Open with." Next, you can select "WordPad Text Editor."
After opening this file, you need to look at the file with the entry 127.0.0.1 localhost. Any other recordings are redundant and only impede and block the stable operation of audio and video files. It is necessary to completely remove all the information from the file and copy only this inscription 127.0.0.1 localhost. Next, you need to click "Save" and restart the computer. The next time you visit the VKontakte page, everything will work fine.