日期:2014-05-16 浏览次数:20788 次
window.onload = initPage; function initPage() { document.getElementById("username").onblur = checkUsername; document.getElementById("register").disabled = true; } function checkUsername() { document.getElementById("username").className = "thinking"; request = createRequest(); if (request == null) alert("Unable to create request"); else { var theName = document.getElementById("username").value; var username = escape(theName); var url= "submit.aspx?username=" + username; request.onreadystatechange = showUsernameStatus; request.open("GET", url, true); request.send(null); } }