Ajax, "Asynchronous Javascript And XML", is a web development technology for creating interactive web applications.
Ajax = Asynchronous JavaScript and XML (a subset of the standard universal markup language).
Ajax is a technology for creating fast, dynamic web pages.
Ajax is a technology that updates parts of a web page without having to reload the entire web page.
Ajax can make web pages asynchronously update by doing a small amount of data exchange with the server in the background. This means that some part of the page can be updated without reloading the entire page.
1. Create an xmlHttpRequest object
If(window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
If(xmlHttp.overrideMimeType){
xmlHttp.overrideMimeType("text/xml");
}
}else if(window.AcTIveXobject){
Var acTIveName = ["MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
For(var i=0; i"acTIveName.length; i++){
Try{
xmlHttp = new AcTIveXobject(activeName[i]);
Break;
}catch(e){
}
}
}
If(!xmlHttp){
Alert ("Failed to create xmlhttprequest object");
}else{
}
2. Set the callback function
xmlHttp.onreadystatechange= callback;
Function callback(){}
3. Use the OPEN method to establish a connection with the server xmlHttp.open ("get", "ajax?name="+ name, true)
This step pays attention to setting the request mode of http (post/get). If it is POST mode, pay attention to setting the request header information xmlHttp.setRequestHeader ("Content-Type", "application/x-")
4. Send data to the server
xmlHttp.send(null);
If it is POST, it is not empty.
5. Process different response states in the callback function
If(xmlHttp.readyState == 4){
/ / Determine whether the interaction is successful
If(xmlHttp.status == 200){
/ / Get the data returned by the server
/ / Get plain text data
Var responseText =xmlHttp.responseText;
document.getElementById("info").innerHTML = responseText;
}
}
Components such as resistors, LED lights, sensors, and even chips can be mounted on membrane switch circuit. Membrane Switches are not just buttons to human - computer anymore. Based on different circuit materials, the membrane switch can integrate more electronic functions, even move all the components originally placed on the PCB to the membrane switch.
Led Membrane Switches,Led Membrane Switch Button,Led Membrane Switch Panels,Mechanical Led Membrane Switches
KEDA MEMBRANE TECHNOLOGY CO., LTD , https://www.kedamembrane.com