How to make a script?
A script is a special component written in one of the programming languages that is embedded in the HTML code, responsible for running scripts on the server or client side. As a rule, a script that interacts with the server part is written to facilitate and speed up the processing of large streams of information, and the user script is responsible for processing the data received from the user as a result of an action by him. Most often, as such an action that executes a particular script, is a click.
Visual Basic Scripting Edition (VBScript) is one of the most common programming languages created by Microsoft specifically for scripting. It is a type of Visual Basic language.
An example of the simplest script in VBScript:
- 'A "Hello, World!" program
- Module Hello
- Sub Main ()
- MsgBox ("Hello, World!")
- End sub
- End Module
- The first line is a comment to the script. Anything behind the 'compiler will not recognize. This text is for your convenience only.
- Further, any script in VBScript must contain the Main procedure, which is the starting point of the program and controls the operation of the application.
- The Main procedure calls the MsgBox function, which displays a dialog box with any textual content.
To run the script via the command line, you must do the following:
- Create a text source document and save it with the Hello.vb extension.
- Enter the vbc Hello.vb command.
- The compiler will create a Hello.exe file.
- To run the program, enter the Hello command.
- <! DOCTYPE HTML>
- <meta charset="utf-8">
- <p>Начало документа...</p>
- alert ('Hello world!');
- <p>... Конец документа</p>
PHP programming language is used to generate HTML pages on a web server and work with databases. The PHP script looks like this:
- <title>Текст PHP</title>
- <? php echo '<p>Hello world!</p>'; ?>
The file with the script code must be placed in the root directory of the web server. To run it, you first need to enter in the browser the name of the web server you are using and the name of the file with the .php extension.
How to raise the foundation of the house
What should be the president
What dream acquaintance
What ended Karpov
How to make a flashlight
A hammock with your own hands is just
How to raise self-esteem
What are the fish