How do they make real time data live on a web page?

后端 未结 3 1417
半阙折子戏
半阙折子戏 2020-12-29 11:11

How do they do this? I would like to have web pages with data fields that change in real time as a person views the web page. Here is an example.

How do they do this

3条回答
  •  灰色年华
    2020-12-29 12:01

    I did it with JavaScript timer set execution in milliseconds, each time timer executed function that queried Server with Ajax and returned value(possibly JSON format), then you you update your field with the value. I did it each 5 sec and it works perfectly. In ASP.NET I think it called Ajax Timer Control.

提交回复
热议问题