日期:2014-05-16 浏览次数:20731 次
var arrayStr = data.result.split(";");
var htmlStr = "" ;
htmlStr = htmlStr + "<table width='100%' border='1px'>";
for(var i = 0 ; i < arrayStr.length-1 ; i++){
var tid = "ajax"+ i ;
var rid = "rajax"+i ;
htmlStr = htmlStr + "<tr id='"+tid+"'>";
htmlStr = htmlStr + "<td id='"+rid+"'>";
htmlStr = htmlStr + arrayStr[i];
htmlStr = htmlStr + "</td>";
htmlStr = htmlStr + "</tr>";
//通过live()绑定
$("#"+tid).live("mouseout",function(){
//事件运行代码
$(this).css({"background-color":lightgray});
});
//通过live()绑定
$("#"+tid).live("mousemove",function(){
//事件运行代码
$(this).css({"background-color":white});
});
}
htmlStr = htmlStr + "</table>";
$('#ajaxQueryDiv').html(htmlStr);
divShow("search");