AJAX,检查更改并刷新!! [英] AJAX , check for changes and do refresh!!

查看:48
本文介绍了AJAX,检查更改并刷新!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个php文件''check.php''检查更改,并显示帖子的计数器!!

i got this php file ''check.php'' that checks for changes ,and showing a counter for posts !!

展开 | 选择 | Wrap | 行号

推荐答案

只需将responseText与输出内容的位置进行比较,或者在(没有)更改时更改PHP代码以输出其他内容。
Just compare the responseText with wherever the content is output, or change your PHP code to output something else when (no) changes have been made.


我如何比较响应,这是我的问题,我不知道如何从php文件传递值,如何获得正确的值到ajax并比较更改?

需要更多的帮助!!


thanx
how can i compare the response ,this is my problem ,i don''t know how the pass the value from the php file ,how to get the right value to the ajax and compare the changes?

need little more help on that!!

thanx


PHP文件的输出将在req.responseText中作为字符串。您可以简单地与您已经设置的值进行比较:
The output from the PHP file will be in req.responseText as a string. You can simply compare against whatever value you''ve already set:
展开 | 选择 | Wrap | 行号


这篇关于AJAX,检查更改并刷新!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆