2011-08-01 41 views
0

我有動態數組(對象)的Javascript解析陣列爲輸入參數

var variables = {}; 

variable["var1"] = someValue; 
variable["var2"] = someValue; 
... 
variable["varN"] = someValue; 

,以及如何我可以把它歸到這個FCE:

$("#uploadForm").ajaxSubmit({ 
    data: { variables } 
}); 

回答

2

嘗試

$("#uploadForm").ajaxSubmit({ 
    data: variables 
});