Home >Web Front-end >JS Tutorial >Ajax submission form to achieve web page refresh registration example_Basic knowledge
Ajax no refresh
if(xmlHttp.status!=200) //When equal to 500, it is an error in the sql statement or database
{return;}
//
var num = xmlHttp.responseText; //Receive information sent by the server
//alert(num);
all.l1.innerText="";
if(num>0)
{
all.l1.innerText="This username has been used!";
}
else
{
all.l1.innerText="√";
}
}