偶尔会遇到jquery操作map的时候,但经常忘记,所以记录一下:
后台java代码,生成map数据
if (Collections.isNotEmpty(vidList)) {
this.dtcMap = new HashMap<string>();
for (String vid : vidList) {
boolean isExist = (iCache.get("EMC" + vid) != null);
// LOGGER.info("******************************** vid = " + iCache.get("EMC" + vid));
if (isExist) {
dtcMap.put(vid, iCache.get("EMC" + vid));
}
}
}</string>
前台Jquery操作
使用 Husky 将 pre-commit、pre-push 和 commit-msg 检查集成到仓库中,以便代理和开发人员在更改离开工作站之前运行相同的本地防护措施。
function getDtcAndGps() {
$.Ajax( {
url : $.webPath + 'obd/monitor/getMonitorRtDtc.do',
success : function(data) {
if (data.errMsg) {
$.alert(data.errMsg);
} else {
$("#carContentDiv").empty();
var html = "";
$.each(data.dtcMap, function(key, value) {
html += "<div>A:@@##@@" + key
+ "</div>";
// html += value;
// html += key;
});
$(html).appendTo("#carContentDiv");
// $.alert(data.dtcMap);
}
}
});
}










