我想通过Javascript在XPages中使用相同的功能。

Dim firstList List As Double
Dim secondList List As Double

firstList("any")= 0
firstList("many")= 2
firstList("work")= 23


任何建议表示赞赏。问候
库姆·阿塔(Cumhur Ata)

最佳答案

使用JavaScript object

用初始化对象

var firstList = {any:0, many:2, work:23};


要么

var firstList = {};
firstList.any = 0;
firstList.many = 2;
firstList["work"] = 23;


通过获取条目值

var anyNumber = firstList.any;
var manyNumber = firstList["many"];

07-24 09:38