Home  >  Article  >  Web Front-end  >  JS function instructions for processing VBArray_javascript skills

JS function instructions for processing VBArray_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:04:561799browse

varName = new VBArray(safeArray)
Parameters
varName
Required. The variable name assigned to VBArray.

safeArray
Required. VBArray value.

Notes
The safeArray parameter must have a VBArray value before being passed to the VBArray constructor. To get the value, you can retrieve the value from an existing ActiveX or other object.

Note
Arrays created in JScript and arrays created in Visual Basic can be interoperated with .NET Framework arrays. Therefore, elements of arrays created in Visual Basic can be accessed directly in JScript. The VBArray object is provided for backward compatibility only. For more information about arrays, see Array Objects, Dim Statement, and AllMembers.T:System.Array.


VBArray can have multiple dimensions. The index for each dimension can be different. The dimensions method retrieves the number of dimensions in an array; the lbound and ubound methods retrieve the index range used for each dimension.

Properties
VBArray objects have no properties.


You can use getItem(colIndex, rowIndex) to directly access VBArray in JS (no need for new VBArray).
VBArray object provides the following methods:
dimensions(): Get the number of columns
ubound(colCount): Get the number of rows based on the number of columns (dimension).
lbound(colCount): Used to determine where the index starts. This is not very meaningful and usually returns 0.
toArray(): directly becomes a js array (one-dimensional).
getItem(y, x): Get the xth row and yth column.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn