of regular expressions is a language with unknown string processing capabilities. VBScript is a subset of Visual Basic and has rich string processing functions. Similar to C, JScript does not have this capability. Regular Expressions significantly improve the string processing capability of JScript. However, it may be more efficient to use regular expressions in VBScript. It allows multiple string operatio
Abstract:
This article demonstrates several important applications of ASP server scripts.
Directory:1. Traverse collection/Object1.1 VBScript traversal form set1.2 JScript traversal form set
2. Convert the value to a variable and assign a value to it.2.1 VBScript convert a value to a variable and assign a value2.2 JScript convert a value to a variable and assign a value
3. dynamically include files3.1 VBSc
When writing an ASP program, VBScript is usually used. However, you can also use JScript instead of this option. However, when JScript is used as the ASP language, it is slightly inconvenient than VBScript, for example, the GetRows method of RecordSet.
RecordSet objects are generally used to operate databases in ASP. If you focus on program efficiency, the GetRows method of the RecordSet object may be used
Summary:
This article demonstrates several important applications of ASP server-side scripting.
Directory:
1. Traverse the collection/object
1.1 VBScript traverse a collection of forms
1.2 JScript Traverse Form Collection
2. The conversion value is variable and assigned
2.1 VBScript Transition measure value is variable and assigned value
2.2 JScript Transition measure value is variable and assign value
3
Turn from: chinabyte
Which language is better for VBScript and JScript in an ASP environment? This article tests the time required by both scripting languages to complete common operations, analyzes their strengths and weaknesses, and draws some noteworthy conclusions based on the test results.
Author: Cactus Studio
Original source: http://www.asptoday.com/articles/20000920.htm
Choosing a scheme system involves many factors, often related to cost a
The special features of the operators quot; | quot; and quot; amp; quot; In JScript are used to simplify the code into many operators in JScript, three logical operators are provided.
,
|And
!Oh ?! Is provided in advanced languages. According to our normal understanding of logical operations, the logical operation result should be true or false. However, the logic operations of
The special features of the operators quot; | quot; and quot; amp; quot; in JScript are used to simplify the code into many operators in JScript, three logical operators are provided.
,
|And
!Oh ?! Is provided in advanced languages. According to our normal understanding of logical operations, the logical operation result should be true or false. However, the logic operations of
A JScript syntax error occurs when a JScript statement violates one or more syntax rules of the JScript Language. JScript syntax error occurs inProgramCompile the program before running the program.
Error Code Description1019 there cannot be "break" outside the loop"1020 "continue" is not allowed out of the loop"1030
We use the prototype property to provide a set of basic functions for the object's class. And a new instance of the object "inherits" the action given to the object's prototype. But how exactly is this prototype implemented and managed?
For a description of the object's prototype property, the JScript manual says: All JScript internal objects have read-only prototype properties. You can dynamically add fun
As a powerful tool for text substitution, search and extraction in pattern matching, the application of regular expression (Regular Expression) has been gradually infiltrated into network development from the UNIX platform, as the server-side/client Script development language JScript, More and more regular expression applications are being incorporated into them to make up for the inadequacy of their ability to deal with the text. Here, we use the JS
1. Traverse the collection/object
1.1 VBScript traverse a collection of forms
LineNum
for each temp in request.Form response.write temp": "request.form(temp) next %>
1.2 JScript Traverse Form Collection
LineNum
for (var $e=new Enumerator(Request.Form); !$e.atEnd(); $e.moveNext()){ Response.Write($e.item()+': } %>
2. The conversion value is variable and assigned
2.1 VBScript Transition measure value is variable and assig
As a powerful tool for text substitution, search and extraction in pattern matching, the application of regular expression (Regular Expression) has been gradually infiltrated into network development from the UNIX platform, as the server-side/client Script development language JScript, More and more regular expression applications are being incorporated into them to make up for the inadequacy of their ability to deal with the text. Here, we use the JS
Js|jscript runs a lookup in a string with a regular expression pattern and returns an array that contains the result of the lookup.
Rgexp.exec (str)
Parameters
Rgexp
Required option. A regular expression object that contains the regular expression pattern and the available flags.
Str
Required option. The string object or string literal in which to perform the lookup.
Description
If the Exec method does not find a match, it returns NULL. If it fi
js|jscript| operations
Operator Precedence in JScript is a set of rules. This rule controls the order in which operators are executed when evaluating an expression. Operations with higher precedence are performed Fuxian to lower-priority operators. For example, multiplication is performed prior to addition.
The following table lists the JScript operators by prio
A JScript running error occurs when the JScript tries to execute an action that cannot be run by the system.Errors. When the script is running, the variable expression is calculated, or the memory is dynamically allocatedWhen the Script is running incorrectly.Error Code descriptionThe length of an array of 5029 must be a finite positive integer.5030 the length of the array must be assigned a finite positive
When using VBScript, we can use application cache arrays to implement caching, for example:
Program code:
Copy Code code as follows:
Dim Rs,arr
Rs. Open conn,sql,1,1
Arr=rs. GetRows ()
Application.Lock ()
Application ("Cache") =arr
Applicatoin.unlock ()
In VBScript, arrays can be stored in application objects, but if the ASP's language is selected as JScript, then it's not good, and when we use application to store an
js|jscript| reserved word
Jscript has some reserved words that cannot be used in identifiers. Reserved words have special meanings for Jscript languages, and they are part of the language syntax. Using reserved words will produce a compilation error when loading the script.
Jscript also has some reserved words for futu
Idea: Call the object through the new activexobject () method in JScript
// Demo 1 reads data
Function readfromdb (){VaR S = "";// Create a database objectVaR objdbconn = new activexobject ("ADODB. Connection ");// DSN string// Var strdsn = "driver = {SQL Server}; server = 127.0.0.1; database = study; uid = sa; Pwd ="; // SQL server connection method// Var strdsn = "provider = Microsoft. Ace. oledb.12.0; Data Source = c: \ database1.accdb; persi
In JScript, the undefined identifier is used to indicate what is undefined? What is the difference and connection between it and "undefined" (including? Why can't I use undefined to compare variables sometimes?
The difference between underfined and "undefined" can be seen at a glance. In general, we think that undefined is a "keyword" provided by JScript, but "undefined" is a string without any suspense, t
In JScript, the undefined identifier is used to indicate what is undefined? What is the difference and connection between it and "undefined" (including? Why can't I use undefined to compare variables sometimes?
The difference between undefined and "undefined" can be seen at a glance. In general, we think that undefined is a "keyword" provided by jscript, but "undefined" is a string without any suspense, t
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.