
As shown above, the above data is static, according to the front-end must have to refresh the page to show the latest data, how to get into a date/time and the dynamic display of data have been???????????
CodePudding user response:
Write a setInterval, every once in a while to refresh the data at a timeCodePudding user response:
Write a timer, and then with a watch to monitor events to monitor data changesCodePudding user response:
websocketCodePudding user response:
Combined with the bosses, upstairs is one of two ways, one is polling, refresh every once in a while, 2 is the websocket, connected to the socket socket will return data, data change after you in to the table to assign a value,