Home > Backend Development > PHP Tutorial > js怎么获取购物车中选中的checkbox的值并返回给php

js怎么获取购物车中选中的checkbox的值并返回给php

WBOY
Release: 2016-06-13 12:06:01
Original
1435 people have browsed it

js如何获取购物车中选中的checkbox的值并返回给php
我现在想做这样一个效果
购物车里选中checkbox,js返回选中物品的id号并返回给php,php则连接数据库查询出结果。
其他的都可以实现了,现在的问题是js中得出的id号如何赋值给php呢?
------解决方案--------------------
form提交或者Ajax提交。看你是哪一种。
------解决方案--------------------
使用ajax更好些,而且可以实现无刷新进行交互,多好。

Related labels:
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