Which is better: a tablet or notebook
Can I make a diamond from graphite

How to create a java script

How to create a java script

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

JS file is a plain text document that can be created and edited with standard system tools.

Create file

Create JS file in several ways. The program code stored in the document and does not require additional machining program compiler. To create a document that will be read in as a script file, right click on a blank area in the "Explorer» Windows or on the desktop. select the "Create" in the context menu - "Text Document". Next you will be asked to specify a name for the file and its extension. If you want to document properly connected to the HTML-page, it is desirable to set the script name using Latin letters. After specifying the name, move the cursor to the right of the point, which was immediately after the title. Windows Change proposed extension «.txt» on «.js» and press Enter. Confirm the operation and change the extension. Create a document JS completed.


Right click on the newly createdfile. In the menu that appears, select "Open With." The proposed list of parameters, select the program through which it will be easier to make all the input code. For example, you can select the standard application "Notepad" or Wordpad. If you have other editors that can open the JS files, they will also be displayed in the list. After opening you can start typing the code.

"Save" - ​​finished writing the script, save changes to a file using the "File" command.

You can also create a file with JS"Notepad". To do this, open the program by going to "Start" - "All Programs" - "Accessories" - "Notepad." Then start typing the code. When finished, click "Save As" 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». Thus, you specify all the necessary parameters to identify the Java Script file in the system.

Thus Java Script file can be executed both independently and in a browser window after loading an HTML page of the site.

After creating a document you can run itin Windows, and in the "Open with" installed on your computer through your browser menu. JS file can be attached to HTML using a special directive & lt-script type = "text / javascript" href = "put_do_fayla_JS">. At the same time the code & lt-script> should be stated in the section & lt-head> & lt- / head> HTML file.

Comments are closed.