There are two conditions that are essential to learning a programming language. The first is the combination of theory and practice, in the actual routine to verify the theory of books can deepen your understanding of the theory, the second is to learn to summarize, to learn from the experience in the use of learning, as a kind of experience or lessons to refine and in the future application of the improvement, Will certainly improve your understanding of this programming language. The following is the author in the study and use of ASP programming two experience, hope to be helpful to everyone.
Interaction between VBScript and JScript within an ASP page
The ASP has the ability to manage scripting programs in different languages and can automatically invoke the appropriate scripting engine to interpret script code and execute built-in functions. The ASP development environment provides two scripting engines, VBScript (default) and JScript. However, developers are not limited to using both languages, and can use any scripting language if they can provide the right ActiveX scripting engine.
Scripting languages are often chosen for a number of different reasons: it may be the most familiar language for developers, probably the most characteristic support for a given project, and possibly the most efficient. Different environments and requirements allow us to focus on different factors when choosing scripting languages, and at some point we face the problem that the selected scripting language does not directly provide functions that are intrinsic to other languages, or that a script has been written but used in another scripting language.
What should I do now? Do you need to rewrite these scripts with the scripting language you are currently using? Or is it possible to invoke a built-in function of another scripting language in a scripting language? This article is about how to get VBScript scripts and JScript scripts to interact with each other in ASP applications to maximize the feature support for both scripting languages.
One, VBScript, and JScript built-in functions
In VBScript and JScript, there are a number of built-in function functions that are the same or similar. However, functions built into a scripting language do not always have corresponding functions in another scripting language. For example, VBScript provides a number of functions for manipulating strings and formatting data that do not exist in JScript. These functions include StrReverse (), Filter (), and FormatCurrency (). On the other hand, the functions provided by JScript for managing arrays, string encodings, and so on are not defined in VBScript, such as join (), reverse (), POW (), bitwise manipulation, Escape (), and unescape ().
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service