function getNewContent() {
var request = getHTTPObject();if (request) { request.open("GET", "example.txt", true); request.onreadystatechange = function() { if (request.readyState == 4) { alert("Response Received"); var para = document.createElement("p"); var txt = document.createTextNode(request.responseText); para.appendChild(txt); document.getElementById('new').appendChild(para); } }; request.send(null); } else { alert('Sorry, your browser doesn\'t support XMLHTTPRequest'); } alert("Function Done");
}
addLoadEvent(getNewContent);
Firefox显示:ReferenceError: addLoadEvent is not defined,至于什么情况我不太明白,麻烦各位朋友了,谢谢
侃侃无极
相关分类