ASP series lecture (4) use scripting language

xiaoxiao2021-03-06  73

Script language is a language between HTML and Java, C and Visual Basic. HTML is usually used to format text and links. The programming language is usually used to send a series of complex instructions to the computer. The scripting language can also be used to send instructions to your computer, but their syntax and rules are not as strict and complicated in compilation. The scripting language is mainly used to format text and compiled components written in programming languages. Active Server Pages makes a complete process of WEB developers to write a complete process of multi-scripting language. In fact, multiple scripting languages ​​can be used inside a single .asp file. In addition, since the script is read and processed on the server side, the client browser that requests the .asp file does not need to support the script. You can use any of its corresponding script engine installed on the scripting language on the web server. The script engine is a program that handles the command written in a language. Active Server Pages comes with two scripting engines: Microsoft Visual Basic Scripting Edition (VBScript) and Microsoft JScript. You can also install and use other scripting language engines, such as REXX and Perl. If you are already a Visual Basic programmer, you can use VBScript immediately, which is a subset of Visual Basic. If you are Java, C, C or C programmers, you will find that JScript syntax is familiar with you, although JScript is not contact with Java or C. If you are familiar with other scripting languages, such as REXX or Perl, you can get and install the appropriate scripting engine, so you can use the scripting language you are familiar with. Active Server Pages are the host of the ActiveX script. To use a language, you must install the script engine that must follow the ActiveX script standard and as a COM (Component Object Model) object resides on the web server. To set the main scripw language ASP main scripting language is the language used to process commands in the delimiter <% and%> internal. By default, the main scrip language is VBScript. You can make any scripting language with a script engine as a primary scripting language. You can set the primary scripting language page by page, or you can set the main scripting language of all pages in the ASP application. Setting the language for a page to set the primary script language of a single page, you can add the <% @ language%> instruction to the beginning of the .asp file. The syntax of the instruction is: <% @ language = scriptingLanguage%> where ScriptingLanguage is the main scripting language of the page you set. If you have set a page, the page will ignore global settings for all pages in the application. Please follow the guidance of using the ASP instruction. details. Note To use the language of the Object.Method syntax as a primary script language, you must first create the LanguageEngines registry key. To the application setting language In the application, if you want to set a master scrip language for all pages, you can set the Default ASP Language property on the "App Options" tab of the Internet Service Manager. Using VBScript and JScript on the server When using VBScript with VBScript via ASP, both VBScript features will be invalid. Since the Active Server Pages script is performed on the server, the VBScript statement INPUTBOX and MSGBox indicating the element of the user interface will not be supported. In addition, in the server-side script, please do not use the VBScript function CreateObject and getObject.

转载请注明原文地址:https://www.9cbs.com/read-121261.html

New Post(0)