我有一个vldpersonals约会网站我支付了一个开发人员自动更新消息的方式之后人们将不得不刷新页面阅读他把这个代码放在页脚jquery现在吃太多的过程这段代码
function downloadJSAtOnload() {
var element = document.createElement("script");
element.src = "includes/js/defer.js";
document.body.appendChild(element);
}
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
else window.onload = downloadJSAtOnload;
jQuery(document).ready(function($){
var $scores = $("#headernav");
setInterval(function () {
$scores.load("index.php #headernav");
}, 7000);
});