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

WBOY
Release: 2016-06-23 13:32:11
Original
1608 people have browsed it

用thinkphp开发的
现在前台按钮做好可以点击,后台请问怎么连接
新人求教,麻烦各位大大说的详细点,谢谢了


回复讨论(解决方案)

用jquery的ajax,如 $.ajax,$.post ...
这种例子很多,网上找一下,只能帮你到这儿了

点击按钮的时候获取按钮状态,并通过ajax传递到后台

点击之后执行ajax

通过js的异步请求处理
http://www.w3school.com.cn/jquery/ajax_ajax.asp

服务端处理逻辑

额 这是有多菜

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template