代码之家  ›  专栏  ›  技术社区  ›  TruMan1

如何在ASP中创建键/值对?

  •  2
  • TruMan1  · 技术社区  · 14 年前

    如何在ASP/VBScript中执行类似的操作?

    Dim pairs
    pairs= Dictionary(String, Integer)()
    For Each item As String In storage
        Dim temp
        temp = item.Split(".")
        pairs.Add(temp(0), temp(1))
    Next
    
    1 回复  |  直到 13 年前
        1
  •  3
  •   Per Hornshøj-Schierbeck    14 年前

    像这样使用“scripting.dictionary”对象:

    set objPairs = Server.CreateObject("Scripting.Dictionary")
    objPairs.add temp(0), temp(1)