Home  >  Article  >  Backend Development  >  前台页面怎么点击滑动开关按钮,更改数据库状态

前台页面怎么点击滑动开关按钮,更改数据库状态

WBOY
WBOYOriginal
2016-06-13 12:22:191439browse

前台页面如何点击滑动开关按钮,更改数据库状态
用thinkphp开发的
现在前台按钮做好可以点击,后台请问怎么连接
新人求教,麻烦各位大大说的详细点,谢谢了

------解决思路----------------------
用jquery的ajax,如 $.ajax,$.post ...
这种例子很多,网上找一下,只能帮你到这儿了
------解决思路----------------------
点击按钮的时候获取按钮状态,并通过ajax传递到后台
------解决思路----------------------
点击之后执行ajax
------解决思路----------------------
通过js的异步请求处理
http://www.w3school.com.cn/jquery/ajax_ajax.asp

服务端处理逻辑

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