How to write Ajax and Asp
This article focuses on "how to write Ajax and Asp", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to write Ajax and Asp.
Ajax.html
The code is as follows:
Function f () {
Var req = new ActiveXObject ("Microsoft.XMLHTTP")
Req.open ("GET", "t.asproomt1 =" + t1.value, true)
Req.onreadystatechange = function () {
If (req.readyState = = 4) {
If (req.status = = 200) {
Msg.innerText = req.responseXML.documentElement.tagName
}
}
}
Req.send (null)
}
1: display "OK"; other characters: display "Error"