これが私の要件です、私は次のような日付ごとのデータを持つ配列を持っています
$.each(dateWiseArr, function(index, currentDate){
myDateArray[currentDate] = "myData";
dateWiseOtherId[currentDate] = "otherId";
});
alert(myDateArray+"::"+dateWiseOtherId);//working fine and showing right data
$("#myBtn").attr("onClick", "myPassingFunction("+myDateArray+", "+dateWiseOtherId+")");
function myPassingFunction(myDateArray, dateWiseOtherId){
alert(myDateArray[0]);//throw undefined
}
ボタンを押すと、関数呼び出しは正常に実行されますが、変数は文字列になります。
さらに理解が必要な場合はお知らせください。
注:myDate