Create an ArrayList and add elements to it : ArrayList « Dojo toolkit « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojox.collections.ArrayList");

      function testIt() {
        var al = new dojox.collections.ArrayList();
        al.add("A");
        al.add("B");
        al.add("C");
        al.add("D");
        alert(al);
      }
    </script>
  </head>
  <body onLoad="testIt();">
  </body>
</html>








29.32.ArrayList
29.32.1.Create an ArrayList and add elements to it
29.32.2.Insert element into an ArrayList
29.32.3.Clear ArrayList
29.32.4.Does ArrayList contain
29.32.5.Get Iterator from ArrayList
29.32.6.Remove element from ArrayList
29.32.7.Get index of an item in ArrayList
29.32.8.Get element in ArrayList by index
29.32.9.Set element by index
29.32.10.Convert ArrayList to Array
29.32.11.Reverse an ArrayList
29.32.12.Sort an ArrayList