Home / Rest and Holidays / Other / How to create a java script

How to create a java script

/
110 Views

How to create a java script</a>

Java Script is a programming language that is processed by the browser when displaying the content of a website.

The JS file is an ordinary text document that can be created and edited with standard system tools.

Creating a file

You can create a JS file in several ways. The program code is stored in the document and does not require additional processing by the compiler. To create a document that will be read in the system as a script file, right-click on the free area in the Windows Explorer or on the desktop. In the context menu that appears, select the "Create" - "Text document" option. Next, you will be asked to specify a name for the future file and its extension. If you want the document to correctly connect to an HTML page, it is advisable to set the script name using Latin letters. After specifying the name, move the cursor to the right behind the point that followed immediately after the name. Change the proposed Windows extension ".txt" to ".js" and press Enter. Confirm the operation and change the extension. The creation of the JS document is complete.

Editing

Right-click on the newly createdFile. In the menu that appears, select the option "Open with." In the list of proposed parameters, select the program through which you will be most easily able to enter the program code. For example, you can select the standard Notepad or Wordpad application. If you have other editors that can open JS files, they will also be displayed in the list. After opening, you can start typing the code.

After you finish writing the script, save the changes in the file using the command "File" - "Save".

You can also create a JS file withNotepad. To do this, open the program by going to the Start menu - All Programs - Standard - Notepad. Then start entering the program code. After completing the entry, click on the "Save As" button and select the folder in which you would like to save your future Java Script file. Specify a name for the file and after it put the extension ".js". So you specify all the necessary parameters to identify the Java Script file in the system.

Thus, the Java Script file can be executed both independently and in the browser window via a download on the HTML page of the site.

After creating the document, you can run itBoth in Windows and in a browser installed on the computer through the "Open With" menu. The JS file can be connected to HTML using a special directive & lt-script type = "text / javascript" href = "path_to_file_JS">. The & lt-script> must be specified in the & lt-head> & lt- / head> section of the HTML file.

How to create a java script Was last modified: May 23rd, 2017 By Wownaaxk
It is main inner container footer text