/// Reads the URL string as a key-value pair.
///For exampleHttp: // 192.168.1.211/jcysoft6.0 _ Changzhi/vacation.htm? Id = 1 & Action = add
FunctionGetquerystring (key)
{
VaRValue = "";
///Get the URL of the current page
VaRSurl = Invalid Response Doc ument. url;
/// URLWhether the query string is included in
If(Surl. indexof ("? ")> 0)
{
//Break down the URL. The second element is the complete query string.
//That is, the value of arrayparams [1] is [ID = 1 & Action = 2]
VaRArrayparams = Surl. Split ("? ");
//Break down query strings
// Arrayurlparams [0]The value is [ID = 1]
// Arrayurlparams [2]The value is [Action = add]
VaRArrayurlparams = arrayparams [1]. Split ("&");
//Traverse the decomposed key-value pairs
For(VaRI = 0; I <arrayurlparams. length; I ++)
{
//Break down a key-Value Pair
VaRSparam = arrayurlparams [I]. Split ("= ");
If(Sparam [0] = Key) & (sparam [1]! = ""))
{
//The matched key is found and the value is not empty.
Value = sparam [1];
Break;
}
}
}
ReturnValue;
}