开发者

PHP shows newest comment from mysql without refreshing the page.

I want to reach a function like twitter. When people add a comment in my site anywhere. The newest in开发者_运维问答formation will display in one part of my home page. And upload the information without refresh the home page. I think it could be done by ajax, but I am a newbie, can anyone give me a live demo? or introduce me some plugin?


This is a good start for jquery: http://jqueryfordesigners.com/simple-jquery-spy-effect/

Then your ajax call will simply need to get the latest comments from your database. Probably by timestamp or datetime


There is a good example and study material for ajax

http://www.w3schools.com/Ajax/ajax_example.asp
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜