日期:2014-05-16  浏览次数:20442 次

在ecshop的购物流程页,商品列表加一个复选框,并实现与之相对应功能的代码
本帖最后由 wangjingjing_101 于 2013-11-20 16:31:43 编辑

------解决方案--------------------
你不是都写好了吗?
------解决方案--------------------
比如删除,点击的时候获取goods_id 也就是这个复选框的值,用ajax把这个id传到你的php,然后删除。

------解决方案--------------------

<?php
if (isset($_POST['submit']))
{
print_r($_POST['select']);
}
?>
<form action='' method=post>
<input name="select[]" type="checkbox" value="goods_id_1" />
<input name="select[]" type="checkbox" value="goods_id_2" />
<input name="select[]" type="checkbox" value="goods_id_3" />
<input name="select[]" type="checkbox" value="goods_id_4" />
<input type=submit name=submit>
</form>