This article mainly introduces the method of traversing the Request form parameter set in JScript. This article uses traversing the Request.QueryString set as an example to give the implementation code. Friends who need it can refer to it.
There is an Enumerator object under JScript that can traverse the collection. According to its documentation, the following program can be written to iterate through the entire Request.QueryString collection:
The code copy is as follows:var params = new Enumerator(Request.QueryString);
while (!params.atEnd()) {
Response.Write(params.item() + : + Request.QueryString(params.item()) + <br />);
params.moveNext();
}
The only drawback is that the Request object itself is not a collection, so the Request object cannot be traversed. The following line of code will report an error:
The code copy is as follows:
var params = new Enumerator(Request);