CeskyFrenchGermanItalianPortugueseTurkceSpanish

HOW do striped soap
08/27/2016
How to choose a color for the bedroom
08/27/2016

How to embed scripts menu

Inserting menu scripts

Scripts - programs written in a programming language for use on an Internet resource.

To insert the script code necessary to integrate it in the right place on the page under the appropriate tag HTML.

instructions

1

On the internet resources to enable scriptsgenerally use of JavaScript. This programming language enables the integration of active content, on the basis of which builds a menu bar that contains drop-down lists.

2

Open the HTML-page in a texteditor. For this you can use a standard tool in Windows "Notepad", which is accessible by clicking the right mouse button on the file and you select "Open With" from the context menu. For easy editing, you can use a small program Notepad ++, which has the function of backlight HTML and JavaScript-code, which will allow you to easily navigate through your code.

3

In the text of the page you will see the HTML. To insert a script in JavaScript, you will need to go to the section & lt-head> & lt- / head> and enter the correct code. For example:

& Lt-head>
& Lt-script type = «text / javascript»> Content menu script & lt- / script>
& Lt- / head>

In this example, the menu can be directly inserted script for further display page.

4

If the script is distributed as a file in the JS format, you can also include it in the document:

& Lt-script src = «fayl_skripta»> & lt- / script>

In this case, "fayl_skripta" is responsible for the path to the directory where the document with respect to the expansion of JS edit page.

5

Thus, if you copied your script called script.js in the same folder where the HTML file, you will need to simply write:

& Lt-script src = «script.js»> & lt- / script>

6

After editing the file and making it necessarychanges, save the data using the "File" menu - "Save" and open the page in a browser to test the code inserted by pressing the right mouse button on an HTML file and selecting "Open With."

Comments are closed.