Instruction
1
First decide the place where it should happen to run the script.
The execution script contained in the scripte must engage in the "language processor" (or "interpreter") is a program that sequentially reads lines of the script and performs the prescribed action. Such a program may be part of the server software, or part of the software code of the browser depending on the script which language to execute. The PHP script is executed on the server, so to run a scriptand needed a running web server. A JavaScript script is executed in the browser, so to run the scripts in this language browser on our computer.
The execution script contained in the scripte must engage in the "language processor" (or "interpreter") is a program that sequentially reads lines of the script and performs the prescribed action. Such a program may be part of the server software, or part of the software code of the browser depending on the script which language to execute. The PHP script is executed on the server, so to run a scriptand needed a running web server. A JavaScript script is executed in the browser, so to run the scripts in this language browser on our computer.
2
Now more about the scriptAh, executable by the server.
To install a web server and on your computer. He will not even need Internet connection - so the server is called "local". It is very convenient for writing and debugging scriptfor server-side languages (php, perl, etc.). Online you can find distributions (for installation) both paid and free servers for personal use - e.g., Zend, Denver, XAMPP, AppServ, etc. But if constant Internet access is not a problem, it is possible to do without the local server, and use the full web server, any hosting provider. Usually this service is paid, but not very expensive. But you will have the opportunity to enjoy a lot of additional modules, plugins, handlers, statistics and other Goodies not caring at all about their setup and maintenance.
To install a web server and on your computer. He will not even need Internet connection - so the server is called "local". It is very convenient for writing and debugging scriptfor server-side languages (php, perl, etc.). Online you can find distributions (for installation) both paid and free servers for personal use - e.g., Zend, Denver, XAMPP, AppServ, etc. But if constant Internet access is not a problem, it is possible to do without the local server, and use the full web server, any hosting provider. Usually this service is paid, but not very expensive. But you will have the opportunity to enjoy a lot of additional modules, plugins, handlers, statistics and other Goodies not caring at all about their setup and maintenance.
3
And finally, the script running on the browser.
Regarding the client scripts, then we can write and run the simplest of them right now without buying anything, without installing or running. Do: first, open any text editor, such as Notepad. Write only 3 lines of code:<script type="text/javascript">
alert("JavaScript is running!")
</script>Now save this code in a file with the html extension (for example, js-test.html) and run as usual - double click. To expand the html (HyperText Markup Language "hypertext markup language"), the operating system recognizes the file type and runs are scheduled to run such files, the program is a browser. And the interpreter in the browser will read and execute the script. The result will look like the image.
Regarding the client scripts, then we can write and run the simplest of them right now without buying anything, without installing or running. Do: first, open any text editor, such as Notepad. Write only 3 lines of code:<script type="text/javascript">
alert("JavaScript is running!")
</script>Now save this code in a file with the html extension (for example, js-test.html) and run as usual - double click. To expand the html (HyperText Markup Language "hypertext markup language"), the operating system recognizes the file type and runs are scheduled to run such files, the program is a browser. And the interpreter in the browser will read and execute the script. The result will look like the image.
Note
As you can see there is nothing particularly difficult, just a sequence of system commands, which you can easily dial in a command line system shell or in the terminal. The advantage of scripting is that you don't have to type the necessary sequence of commands manually, just run the script.