jquery easyui messager

$.ajax({
type:"post",
dataType:'json',
url:"../hint/searchHint.html",
data:{"readFlag":"0"},
success:function(data){
    if(data.total>0){
    var message="<div style=\"\"><table style=\"table-layout:fixed;width:249px;\">";
for(var i = 0; i <data.rows.length; i++){
  // alert(data.rows[i].title);
  message = message+"<tr><td rowspan=\"2\" style=\"word-wrap:break-word;width:130px;\"><a style=\"text-decoration:none;\" target=\"_blank\" href='"+data.rows[i].url+"'>"+data.rows[i].title+"</a></td><td style=\"text-align:right;\">来自:"+data.rows[i].employeeFromName+"</td></tr><tr style=\"text-align:right;width:100px;\"><td >"+data.rows[i].createTime+"</td></tr><tr><td colspan=\"2\"><hr/></td></tr>";
}
if(data.total>10){
  message = message+"<tr><td colspan=\"2\" style=\"text-align:right;\"><a href=\"${ctxPath}/hint/mainHintPage.html\" target=\"_blank\">更多...</a></td></tr>";
}
message=message+"</table></div>";
// alert(message);
var array = ["slide","fade","show"];
var i = Math.round(Math.random()*3);
$.messager.show({
    showType:array[i-1],
    showSpeed:5000,
    width:300,
    height:300,
title:'系统提醒【'+data.total+'条】',
msg:message,
timeout:60000
});
    }
  }
      });

你可能感兴趣的:(jquery,UI,Ajax)