1.jquery serializeArray()、serialize()追加参数
#serializeArray
var dataParam = $("#updateChannelForm").serializeArray();
例如我想添加sex="男"
dataParam.push({"name":"sex","value":"男"});
#serialize
var dataParam = $("#updateChannelForm").serialize();
例如我想添加sex="男"
dataParam += "&"+"sex=男";
2.后台传来数组前台接收处理
var visitsForHourY = [[${visitsForHourList}]];
var hoursList = '[[${hoursList}]]';
[1,2,3,4,5,6,7,8,9,10]
将数组数据改为String类型
var hoursX =hoursList.replace('[','').replace(']','').split(',');
['1','2','3','4','5','6','7','8','9','10']