Phương thức Items của ASP
Định nghĩa và cách sử dụng
Phương thức Items trả về một mảng chứa tất cả các mục trong đối tượng Dictionary.
Cú pháp:
DictionaryObject.Items
Mẫu
<% dim d,a,i set d=Server.CreateObject("Scripting.Dictionary") d.Add "c","China" d.Add "i","Italy" d.Add "s","Sweden" Response.Write("<p>Giá trị mục:</p>") a=d.Items for i=0 to d.Count-1 Response.Write(a(i)) Response.Write("<br />") next set d=nothing %>
Kết quả đầu ra:
Giá trị mục Trung Quốc Ý Thụy Điển