首页展示6个图片



/csa/WebRoot/edp/layconfig/cssChartLay.jsp
123<div id="lay1" menuId="<s:property value='menuId'/>"></div>
456<div id="lay2" style="margin-top: 5px;"></div>
789<div id="lay3" style="margin-top: 5px;"></div>10000


csa/WebRoot/webpoint/resources/js/edp.js  CssChartLay


---------- 下面为js
function CssChartLay(menuId,month_id) {
window.alert(" CssChartLay---- ");
this.menuId = menuId;
if (typeof CssChartLay._initialized == "undefined") {
CssChartLay.prototype.flush = function (conditions) {
$("#lay1").empty();
$("#lay2").empty();
$("#lay3").empty();
$.getJSON(WebPoint.contextPath+"/edp/layConfig!getCssChartLayConfigs.action?t="+new Date() +"&menuId=" + this.menuId+"&conditions[0].currentValues="+month_id, function (layConfigs) {
for (var i = 0, l = layConfigs.length; i < l&& i < 5; ++i) {
if (layConfigs[i].trendId != null && layConfigs[i].trendId != 0) {
// var trendContainer = $("<td width='50%'><div class='trendContainer'></div></td>");
var trendContainer = $("<div class='trendContainer'></div>");
// var trendContainer2 = $("<td width='50%'><div class='trendContainer2'></div></td>");
if(i<2){
$("#lay1").append(trendContainer);
// $("#lay1").append(trendContainer2);
}else if( i<4 ){
$("#lay2").append(trendContainer);
//$("#lay2").append(trendContainer2);
}else{
$("#lay3").append(trendContainer);
// $("#lay3").append(trendContainer2);
}
new CssChartTrend().flushPage(layConfigs[i].trendId, $(trendContainer), conditions);
//new CssChartTrend().flushPage(layConfigs[i].trendId, $(trendContainer2), conditions);
}
}
});
};
CssChartLay._initialized = true;
}
}

你可能感兴趣的:(图片)