简体   繁体   中英

How to display realtime records from database using codeigniter

How do I write a JavaScript code such that when there is an increase in the value of an input type="text", it should do something.

I fetch a count of database table row into the input, so I want it to alert when there is a change/increase in that value. Thanks

The best way to do it - using sockets .
Logic something like that: on event that modify counter you should "emit" value to frontend. Frontend catch new value and update DOM. Here is example of server side part: Using PHP with Socket.io

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM