Updating display of elements on the web page without refreshing the whole page

别说谁变了你拦得住时间么 提交于 2019-12-25 08:48:27

问题


Last time I coded a web application was almost 10 years ago. I used Java/JSP/HTML/CSS etc. I've been coding non-web applications only ever since.

When I look at modern sites now (like this one), I realize how my web development skills are obsolete. Maybe the most obvious "feature" that I wouldn't know how to implement now is the update of elements on the page after user input without having to refresh the whole page (e.g. the voting/downvoting here updates the vote count without reloading the whole page). What are the basic technologies behind this?


回答1:


The techniques come under the umbrella of AJAX:

Ajax (shorthand for asynchronous JavaScript and XML) is a group of interrelated web development techniques used on the client-side to create interactive web applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. The use of Ajax techniques has led to an increase in interactive or dynamic interfaces on web pages. Data is usually retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not actually required, nor do the requests need to be asynchronous.




回答2:


Something you should know:

  1. DHTML : HTML Document structure,document event;
  2. JAVASCRIPT: use javascript to operate the HTML document;
  3. AJAX: use javascript to communicate with the server.


来源:https://stackoverflow.com/questions/2461802/updating-display-of-elements-on-the-web-page-without-refreshing-the-whole-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!