// For one instance, three textbox. When the user inputs data in the first and second, the third textbox changes accordingly.
Javascript section:
Create an XMLHTTPRequest object
XMLHTTP = new activexobject ("mcrosoft. XMLHTTP"); // IE
XMLHTTP = new XMLHttpRequest (); // FF
// Functions of the onkeyup event in text1 and text2
Url = "default. aspx? A = "form1.elements [" A "]. Value +" & B = "+ form1.elements [" B "]. value;
XMLHTTP. Open ("get", URL, true );
XMLHTTP. onreadystatechange = doupdate; // doupdate is a function name, that is, the updated function.
XMLHTTP. Send ();
// Update the Function
If (XMLHTTP. readystate = 4)
Document. Forms [0]. elements ["tot"]. value = XMLHTTP. responsetext;
// Service Page Content
Int A = 0;
Int B = 0;
If (request. querystring ["A"]! = NULL)
A = int. parse (request. querystring ["A"]. tossring ());
If (request. querystring ["B"]! = NULL)
B = int. parse (request. querystring ["B"]. tostring ());
Response. Write (A + B );
However, I don't know why document. Forms [0]
It won't work if it is changed to form1.