Home > Article > Web Front-end > Detailed steps to update data without refreshing using javascript asp_javascript skills
In programming, we often encounter a situation where it is impossible to know in advance what data the user will need. The data must be re-extracted from the server based on the user's selection and fed back to the user. For example, in a simple case, after the user selects a province, we will immediately redisplay all the cities in the province in the city. In this case, it is generally necessary to refresh the entire page before re-reading it, but this is not only inefficient but also inelegant. In fact, by using JavaScript combined with the XMLHTTP object of Microsoft, we can read the data from the server "slightly" without refreshing, which looks both professional and efficient.
Below we will demonstrate this technology in a case of verifying whether the user is registered.
'Program design: Global Wanwei, a professional virtual host and domain name registration service provider
'Website: http://www.netInter.cn
'This program is Global Wanwei's original program, so if you If you need to reprint, please indicate the source, thank you.
'The above information is an integral part of the article text, so if you want to reprint this article, you must keep the above information.
1. First create a CheckUser.asp file on the server for Detect whether the user exists, and feedback 0 and 1 respectively according to whether the user exists
u_name=Request.QueryString("u_name")
if u_name exists then
Response.write "0"
else
Response.write "1"
end if
2. Client-side HTML design:
1. JavaScript code
2. HTML form design: