/
getItem-Method__VBArray.html
executable file
·59 lines (57 loc) · 15.5 KB
/
getItem-Method__VBArray.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0" encoding="utf-8"?><html xmlns:xsl="urn:schemas-microsoft-com:xslt" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ms-help="http://msdn.microsoft.com/mshelp" xmlns:t="http://www.microsoft.com/topic/t" xmlns:msie="http://www.microsoft.com/ie/msie" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:o="urn:schemas-microsoft-com:office:dvraddata" xmlns:u1="http://www.microsoft.com/vs/dvvwdcon" xmlns:anim="http://www.microsoft.com/windowssdk/anim" xmlns:w="http://www.microsoft.com/windows/w" xmlns:v="http://www.microsoft.com/windows/v" xmlns:msxsl="http://www.microsoft.com/aspnet/cpguide" xmlns:st1="http://www.microsoft.com/webservices/mscomwssdkproject" xmlns:ds="http://www.microsoft.com/xml/xmlsdk/ds" xmlns:xsd="http://www.microsoft.com/xml/xmlsdk/xsd" xmlns:xdr="http://www.microsoft.com/xml/xmlsdk/xdr" xmlns:sql="http://www.microsoft.com/sql/xmlsql" xmlns:ph="http://www.microsoft.com/ph/placeholder" xmlns:xlink="http://www.w3.org/1999/xlink"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="save" content="history" /><title>getItem Method (VBArray) (JavaScript)</title><meta name="Language" content="en-us" /><meta name="System.Keywords" content="getItem method" /><meta name="System.Keywords" content="Item property" /><meta name="Microsoft.Help.F1" content="getItem" /><meta name="Microsoft.Help.Id" content="f62964ad-8b2f-4596-95d0-b20e587ecea5" /><meta name="Description" content="Returns the item at the specified location." /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="Refinement.TopicID" content="196" /><meta name="DCSext.ProductFamily" content="LIB_DG" /><meta name="DCSext.Product" content="VS_JScript" /><meta name="DCSext.Title" content="getItem Method (VBArray) (JavaScript)" /><link rel="stylesheet" type="text/css" href="../styles/presentation.css" /><link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" /><script type="text/javascript" src="../scripts/EventUtilities.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/SplitScreen.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/Dropdown.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/script_manifold.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/script_feedBack.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/CheckboxMenu.js"><![CDATA[ ]]></script><script type="text/javascript" src="../scripts/CommonUtilities.js"><![CDATA[ ]]></script><xml><mshelp:toctitle title="getItem Method (VBArray)" /><mshelp:keyword index="A" term="f62964ad-8b2f-4596-95d0-b20e587ecea5" /><mshelp:keyword index="K" term="getItem method" /><mshelp:keyword index="K" term="Item property" /><mshelp:keyword index="F" term="getItem" /><mshelp:attr name="RevisionNumber" value="14" /><mshelp:attr name="AssetID" value="f62964ad-8b2f-4596-95d0-b20e587ecea5" /><mshelp:attr name="Abstract" value="Returns the item at the specified location." /><mshelp:attr name="TopicVersion" value="8.0.13105.10000" /><mshelp:attr name="Catalog Container" value="System_Default_Catalog" /><mshelp:attr name="Content Set Container" value="System_Default_Content_Set" /><mshelp:attr name="PreferredLib" value="/library/ie" /><mshelp:attr name="Search.Refinement.TopicID" value="196" /><mshelp:attr name="TopicType" value="kbSyntax" /><mshelp:attr name="Locale" value="en-us" /></xml></head><body><input type="hidden" id="userDataCache" class="userDataStyle" /><input type="hidden" id="hiddenScrollOffset" /><img id="collapseImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" alt="Collapse image" title="Collapse image" /><img id="expandImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" alt="Expand Image" title="Expand Image" /><img id="collapseAllImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" /><img id="expandAllImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" /><img id="dropDownImage" style="display:none; height:0; width:0;" src="../icons/dropdown.gif" /><img id="dropDownHoverImage" style="display:none; height:0; width:0;" src="../icons/dropdownHover.gif" /><img id="copyImage" style="display:none; height:0; width:0;" src="../icons/copycode.gif" alt="Copy image" title="Copy image" /><img id="copyHoverImage" style="display:none; height:0; width:0;" src="../icons/copycodeHighlight.gif" alt="CopyHover image" title="CopyHover image" /><div id="header"><table id="topTable" cellspacing="0" cellpadding="0"><tr><td><span onclick="ExpandCollapseAll(toggleAllImage)" style="cursor:default;" onkeypress="ExpandCollapseAll_CheckKey(toggleAllImage, event)" tabindex="0"><img id="toggleAllImage" class="toggleAll" src="../icons/collapse_all.gif" /> <label id="collapseAllLabel" for="toggleAllImage" style="display: none;">Collapse All</label><label id="expandAllLabel" for="toggleAllImage" style="display: none;">Expand All</label> </span><span>    </span><span id="devlangsDropdown" class="filter" tabindex="0"><img id="devlangsDropdownImage" src="../icons/dropdown.gif" /> <label id="devlangsMenuAllLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: All </nobr></label><label id="devlangsMenuMultipleLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Multiple </nobr></label><label id="devlangsMenuVisualBasicLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual Basic </nobr></label><label id="devlangsMenuCSharpLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: C# </nobr></label><label id="devlangsMenuManagedCPlusPlusLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual C++ </nobr></label><label id="devlangsMenuFSharpLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: F# </nobr></label><label id="devlangsMenuHLSLLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: HLSL </nobr></label><label id="devlangsMenuJScriptLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: JScript </nobr></label></span></td></tr></table><div id="devlangsMenu"><input id="VisualBasicCheckbox" type="checkbox" data="VisualBasic,vb,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="VisualBasicCheckbox">Visual Basic</label><br /><input id="CSharpCheckbox" type="checkbox" data="CSharp,cs,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="CSharpCheckbox">C#</label><br /><input id="ManagedCPlusPlusCheckbox" type="checkbox" data="ManagedCPlusPlus,cpp,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="ManagedCPlusPlusCheckbox">Visual C++</label><br /><input id="FSharpCheckbox" type="checkbox" data="FSharp,fs,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="FSharpCheckbox">F#</label><br /><input id="HLSLCheckbox" type="checkbox" data="HLSL,cpp,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="HLSLCheckbox">HLSL</label><br /><input id="JScriptCheckbox" type="checkbox" data="JScript,cs,'persist'" value="on" onclick="SetLanguage(this)" /><label class="checkboxLabel" for="JScriptCheckbox">JScript</label><br /></div><table id="bottomTable" cellpadding="0" cellspacing="0"><tr id="headerTableRow1"><td align="left"><span id="runningHeaderText">JavaScript</span></td></tr><tr id="headerTableRow2"><td align="left"><span id="nsrTitle">getItem Method (VBArray) (JavaScript)</span></td></tr><tr id="headerTableRow3"><td align="left"><a href="#exampleToggle" onclick="OpenSection(exampleToggle)">Example</a>  <a href="#seeAlsoToggle" onclick="OpenSection(seeAlsoToggle)">See Also</a> 
<span id="headfeedbackarea" class="feedbackhead">
<a href="javascript:SubmitFeedback('DevDocs@Microsoft.com','','','','8.0.13105.10000','%0\dThank%20you%20for%20your%20feedback.%20The%20developer%20writing%20teams%20use%20your%20feedback%20to%20improve%20documentation.%20While%20we%20are%20reviewing%20your%20feedback,%20we%20may%20send%20you%20e-mail%20to%20ask%20for%20clarification%20or%20feedback%20on%20a%20solution.%20We%20do%20not%20use%20your%20e-mail%20address%20for%20any%20other%20purpose%20and%20we%20delete%20it%20after%20we%20finish%20our%20review.%0\AFor%20further%20information%20about%20the%20privacy%20policies%20of%20Microsoft,%20please%20see%20http://privacy.microsoft.com/en-us/default.aspx.%0\A%0\d','Customer%20Feedback');">
Send Feedback
</a>
</span>
</td></tr></table><table id="gradientTable"><tr><td class="nsrBottom" background="../icons/gradient.gif" /></tr></table></div><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()" /><font color="DarkGray"><p /></font> <div class="introduction"><p xmlns:util="util">Returns the item at the specified location.</p></div><div id="syntaxSection" class="section"><div id="syntaxCodeBlocks" class="code"><span codelanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left" /></tr><tr><td><pre><span class="parameter" sdata="paramReference" xmlns:util="util">safeArray</span>.<b xmlns:util="util">getItem(</b><span class="parameter" sdata="paramReference" xmlns:util="util">dimension1</span>[, <span class="parameter" sdata="paramReference" xmlns:util="util">dimension2</span>, ...], <span class="parameter" sdata="paramReference" xmlns:util="util">dimensionN</span><b xmlns:util="util">)</b> </pre></td></tr></table></span></div></div><h1 class="heading"><span onclick="ExpandCollapse(sectionToggle0)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(sectionToggle0, event)" tabindex="0"><img id="sectionToggle0" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Parameters</span></h1><div id="sectionSection0" class="section" name="collapseableSection" style="" expanded="true"><dl class="authored"><dt><i xmlns:util="util">safeArray</i></dt><dd><p xmlns:util="util">Required. A VBArray object.</p></dd><dt><i xmlns:util="util">dimension1, ..., dimensionN</i></dt><dd><p xmlns:util="util">Specifies the exact location of the desired element of the VBArray. <i>n</i> equals the number of dimensions in the VBArray.</p></dd></dl></div><h1 class="heading"><span onclick="ExpandCollapse(exampleToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(exampleToggle, event)" tabindex="0"><img id="exampleToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Example</span></h1><div id="exampleSection" class="section" name="collapseableSection" style=""><p xmlns:util="util">The following example consists of three parts. The first part is VBScript code to create a Visual Basic safe array. The second part is JavaScript code that iterates the Visual Basic safe array and prints out the contents of each element. Both of these parts go into the <HEAD> section of an HTML page. The third part is the JavaScript code that goes in the <BODY> section to run the other two parts. </p><div class="code"><span codelanguage="JavaScript"><table width="100%" cellspacing="0" cellpadding="0"><tr><th>JavaScript </th><th><span class="copyCode" onclick="CopyCode(this)" onkeypress="CopyCode_CheckKey(this, event)" onmouseover="ChangeCopyCodeIcon(this)" onmouseout="ChangeCopyCodeIcon(this)" tabindex="0"><img class="copyCodeImage" name="ccImage" align="absmiddle" alt="Copy image" title="Copy image" src="../icons/copycode.gif" />Copy Code</span></th></tr><tr><td colspan="2"><pre><head>
<script type="text/vbscript">
<!--
Function CreateVBArray()
Dim i, j, k
Dim a(2, 2)
k = 1
For i = 0 To 2
For j = 0 To 2
a(i, j) = k
document.writeln(k)
k = k + 1
Next
document.writeln("<BR>")
Next
CreateVBArray = a
End Function
-->
</script>
<script type="text/javascript">
<!--
function GetItemTest(vbarray)
{
var i, j;
var a = new VBArray(vbarray);
for (i = 0; i <= 2; i++)
{
for (j =0; j <= 2; j++)
{
document.writeln(<span class="label">a.getItem(</span>i<span class="label">,</span> j<span class="label">)</span>);
}
}
}
-->
</script>
</head>
<body>
<script type="text/javascript">
<!--
GetItemTest(CreateVBArray());
-->
</script>
</body></pre></td></tr></table></span></div></div><h1 class="heading"><span onclick="ExpandCollapse(requirementsTitleToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(requirementsTitleToggle, event)" tabindex="0"><img id="requirementsTitleToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Requirements</span></h1><div id="requirementsTitleSection" class="section" name="collapseableSection" style=""><p xmlns:util="util">Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, and Internet Explorer 10 standards. Not supported in Windows Store apps. See <mshelp:link keywords="440f4924-f7a9-48e0-873e-bd599a93b437" tabindex="0">Version Information</mshelp:link>. </p><p xmlns:util="util"><b>Applies To</b>: <span sdata="link"><a href="f0b767f1-ea8a-4726-962b-2708d4742518.htm">VBArray Object (JavaScript)</a></span></p></div><h1 class="heading"><span onclick="ExpandCollapse(seeAlsoToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(seeAlsoToggle, event)" tabindex="0"><img id="seeAlsoToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />See Also</span></h1><div id="seeAlsoSection" class="section" name="collapseableSection" style=""><h4 class="subHeading">Other Resources</h4><div class="seeAlsoStyle"><span sdata="link" xmlns:util="util"><a href="ac83589e-85d9-48cb-b28d-c579e65fd604.htm">dimensions Method (VBArray) (JavaScript)</a></span></div><div class="seeAlsoStyle"><span sdata="link" xmlns:util="util"><a href="30ff5e8a-8165-494b-bce8-0a562ec2eec3.htm">lbound Method (VBArray) (JavaScript)</a></span></div><div class="seeAlsoStyle"><span sdata="link" xmlns:util="util"><a href="664de44c-2039-4289-82f6-948e9d744d80.htm">toArray Method (VBArray) (JavaScript)</a></span></div><div class="seeAlsoStyle"><span sdata="link" xmlns:util="util"><a href="761811c5-9a3d-4cb3-bfe0-0a8749f34496.htm">ubound Method (VBArray) (JavaScript)</a></span></div></div></div><div id="footer"><div class="footerLine"><img width="100%" height="3px" src="../icons/footer.gif" alt="Footer image" title="Footer image" /></div>
<span id="feedbackarea">
Send
<a href="javascript:SubmitFeedback('DevDocs@Microsoft.com','','','','8.0.13105.10000','%0\dThank%20you%20for%20your%20feedback.%20The%20developer%20writing%20teams%20use%20your%20feedback%20to%20improve%20documentation.%20While%20we%20are%20reviewing%20your%20feedback,%20we%20may%20send%20you%20e-mail%20to%20ask%20for%20clarification%20or%20feedback%20on%20a%20solution.%20We%20do%20not%20use%20your%20e-mail%20address%20for%20any%20other%20purpose%20and%20we%20delete%20it%20after%20we%20finish%20our%20review.%0\AFor%20further%20information%20about%20the%20privacy%20policies%20of%20Microsoft,%20please%20see%20http://privacy.microsoft.com/en-us/default.aspx.%0\A%0\d','Customer%20Feedback');">
feedback
</a>
on this topic to Microsoft.
</span>
</div></div></body></html>