Ways to submit a request to the web server
In the traditional web model,HTML Form elements are used to submit request to web server. The HTML code below is an example of an HTML form:
1: <form id=”loginForm” action=”login.jsp”> 2: <input type=”text” id=”userName”/> 3: <input type=”submit” id=”login” value=”Login” > 4: </form>
The data of the sent message is combined with the data in the html form. In the above code,the content of the message is the value of the userName textbox.
After submitting the request,the web browser then receives a new HTML page from the web server
In the Ajax web model,there is another way,by using the XMLHttpMessage object to communicate with web server. The XMLHttpMessage object is used to send/receive messages to and from the web server.
|