87,910
社区成员
发帖
与我相关
我的任务
分享
function b(str) {
$("#page_scroll").empty(); // 清空原來获取的数据.page_scroll是一个<ul>
if (str != null && str.length > 0) {
var table_str = "";
// 獲取了數據
table_str += "<li id='数据'>数据</li>";
$("#page_scroll").html(table_str); // 添加到ul中
// 应该是并且的关系
if (settimeout_id != null && settimeout_id != "") {
table_str = null;
window.clearTimeout(settimeout_id); // 清除settimeout函數產生的內存消耗.
settimeout_id = null;
// 每隔 5 秒释放一次内存
if (isIE) {
CollectGarbage();
}
}
settimeout_id = window.setTimeout("a()", 5000); // 設置自動刷新.
}
}