1,传值
function linkChart(){
var startTime = $('#startTime').datetimebox('getValue');
var endTime = $('#endTime').datetimebox('getValue');
window.open('${pageContext.request.contextPath}/echarts.jsp?startDate='+startTime+'&endDate='+endTime);
}
2,直接从js里面取值
var start = '<%=request.getParameter("startDate")%>';
var end = '<%=request.getParameter("endDate")%>';
//查询出联通出错的
$.ajax({
url : '${pageContext.request.contextPath}/echarts/analysis/lt',
dataType : 'json',
async : false,
type : 'POST',
data : {
start : start,
end : end
},
success : function(data) {
for(var i=0;i<data.length && i<10;i++) {
if(data[i][0]==null){
ltarr[i][0] = '先前为空的';
// continue;
}else{
ltarr[i][0] = data[i][0];
}
ltarr[i][1] = data[i][1];
}
}
});