function innerFun(json){
for (var i = 0; i < json.length; i++) {
var CRT_DATE = json[i].CRT_DATE;
var TITLE = json[i].TITLE;
var SM_ID = json[i].SM_ID;
var WORK_ID = json[i].WORK_ID;
if (TITLE.length > 8) {
TITLE = TITLE.substring(0, 8) + "...";
}
tempHtml += "<li style='border-bottom: 1px dotted #858585;'>"
// 这行是重点 拼接带有函数的html
tempHtml += "<em> " + CRT_DATE + " </em> <span> <a href='#' title=" + json[i].TITLE + " οnclick='viewNotice(" + WORK_ID + "," + SM_ID + ")'>" +
TITLE +
" </a></span> <img src='images/new.gif' class='new' > </li> ";
}
if (json.length > 0) {
tempHtml = " <ul class='num2'> " + tempHtml + " </ul> ";
}
else {
tempHtml = " <div align='center' style='color:red'> 您目前没有需要处理的项! </div> ";
}
tempHtml = " <ul class='num2'> " + tempHtml + " </ul> ";
// window.alert(tempHtml);
$('#lastestNotices').append(tempHtml);
}
for (var i = 0; i < json.length; i++) {
var CRT_DATE = json[i].CRT_DATE;
var TITLE = json[i].TITLE;
var SM_ID = json[i].SM_ID;
var WORK_ID = json[i].WORK_ID;
if (TITLE.length > 8) {
TITLE = TITLE.substring(0, 8) + "...";
}
tempHtml += "<li style='border-bottom: 1px dotted #858585;'>"
// 这行是重点 拼接带有函数的html
tempHtml += "<em> " + CRT_DATE + " </em> <span> <a href='#' title=" + json[i].TITLE + " οnclick='viewNotice(" + WORK_ID + "," + SM_ID + ")'>" +
TITLE +
" </a></span> <img src='images/new.gif' class='new' > </li> ";
}
if (json.length > 0) {
tempHtml = " <ul class='num2'> " + tempHtml + " </ul> ";
}
else {
tempHtml = " <div align='center' style='color:red'> 您目前没有需要处理的项! </div> ";
}
tempHtml = " <ul class='num2'> " + tempHtml + " </ul> ";
// window.alert(tempHtml);
$('#lastestNotices').append(tempHtml);
}