Home >Backend Development >PHP Tutorial >ajax由前端页面触发发起,反过来能实现吗? - SegmentFault

ajax由前端页面触发发起,反过来能实现吗? - SegmentFault

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 17:27:03961browse

如题,ajax都是由前端页面某个动作触发,然后到后台取数据,再动态返回给前端.比如实现无刷新修改html元素.那反过来,由php后端执行到某段代码,如果成功,就动态的修改前端页面的代码,同样实现无刷新,有这个技术吗?

回复内容:

如题,ajax都是由前端页面某个动作触发,然后到后台取数据,再动态返回给前端.比如实现无刷新修改html元素.那反过来,由php后端执行到某段代码,如果成功,就动态的修改前端页面的代码,同样实现无刷新,有这个技术吗?

  • 2 小时前提问
  • 1 评论
  • 邀请回答

请先 登录 后评论

默认排序 时间排序

2 个回答

2

websocket推送数据给前端

comet,websocket都可以,不过都是需要client端发起连接。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn