0
大家好我對自己在陣的陣一個小問題以及如何調用它... EX:jQuery的數組中的數組
var plotName = ['bearShevaPlot', 'haifaPlot', 'tiberiasPlot', 'kfarSabaPlot', 'netanyaPlot', 'rishonLezionPlot', 'rehovotPlot', 'telAvivPlot'];
var chartName = ['bearShevaCity', 'haifaCity', 'tiberiasCity', 'kfarSabaCity', 'netanyaCity', 'rishonLezionCity', 'rehovotCity', 'telAvivCity'];
調用所有的數組和他們每個人大跳功能我將使用.each jQuery函數。
$.each(plotName,function(cName,pName){
chartName[cName];
var pName = $.jqplot(''+chartName[cName]+'', [/* another var */], {
//my code here
});
});
,因爲我需要有一個第三個變種我想有一個像數組裏的數組:
var plotName = [['bearShevaPlot', 'bearSheva'], ['haifaPlot', 'haifa'], ['tiberiasPlot', 'tiberias'], ['kfarSabaPlot', 'kfarSaba'], ['netanyaPlot', 'netanya'], ['rishonLezionPlot', 'rishonLezion'], ['rehovotPlot', 'rehovot'], ['telAvivPlot', 'telAviv']];
,我的問題是,我怎麼能叫「bearSheva」這是第二次VAL數組內的第一個數組。
感謝您的幫助,我的英語不好:)