Effect Demo:
Description
1.onreadystatechange Event trigger for request state change (this method is called when readystate changes)
2.readyState has v Status:
ReadyState = 0 Not initialized
ReadyState = 1 means the Open method was successfully called
ReadyState = 2 The server has answered the client request
ReadyState = 3 in the interaction. The HTTP header information has been received and the response data has not been received.
ReadyState = 4 Data reception complete.
3.onblur method: How the text box responds when it loses focus,
<span id= "mydiv" > </span><br> tips for placing a check
4. Verification steps:
Create a XMLHttpRequest object----> Create an HTTP request-----> Send an HTTP request------> Return a request-----checksum.
This example is the connection TXT text file implementation verification
Connection database Check mode reference: http://blog.csdn.net/javaalpha/article/details/6559176
About ajax+jsp implementing asynchronous validation of the existence of an instance of the user name (. txt text)