form提交数据给后台,前端给他需要的值
来源:互联网 发布:socket vc 编程实例 编辑:程序博客网 时间:2024/05/21 21:47
<form onsubmit="return OrderSubmit()"> <!-- order-dishes--> <div class="dish_order_number">牌号 <input type="text" class="marknum" value="121"/> 用餐人数 <input type="text" class="num_dine" value="121"/></div> <ul class="dish_order_tab"> <li>菜名</li> <li>单价</li> <li>数量</li> <li>操作</li> </ul> <ul class="dish_order_info" id="orderList"> </ul> <div class="dish_order_total"> 合计:<span class="total">0</span> </div> <div class="dish_order_remark_title">整单备注:</div> <div class="dish_order_remark"><input type="text"/></div> <div class="dish_order_sure"> <input type="submit" class="btn btn-primary" value="确定下单" name="_order_this"/> <input type="submit" class="btn btn-primary" value="立即结账" name="_to_checkout"/> </div> </form>
function OrderSubmit(){ // 下单提交 $("#orderList>li").each(function(){ var item={}; var index=parseInt($(this).find(".dish_order_info_img>a").attr('data')); console.log(index); item.dishId=D_LIST[index].dishId; item.price=D_LIST[index].price; item.count=$(this).find("._dish_count").html(); console.log(item.count); $(this).find('input[name=_idPriceCount]').val(JSON.stringify(item)); }); }
0 0
- form提交数据给后台,前端给他需要的值
- Ajax提交数据给后台
- 使用formData给后台提交表单数据
- springmvc 带查询条件的分页,form的控制范围,怎么包裹条件提交给后台
- springmvc 带查询条件的分页,form的控制范围,怎么包裹条件提交给后台
- springmvc 带查询条件的分页,form的控制范围,怎么包裹条件提交给后台
- 前端传值给后台的三种方法
- 前端传数组给后台的问题
- MVC后台数据赋值给前端JS对象
- MVC后台数据赋值给前端JS对象
- MVC后台数据赋值给前端JS对象
- 前端jsp以数组形式提交数据给服务器
- JSON格式-给后台传递数据时需要注意的地方
- 给form添加提交前的验证"onsubmit"
- 给一个url获得后台的数据
- 自动给页面提交数据的方法
- 给WCF增加提交数据的容量。
- select回显示--这个方法虽然可以传值给后台,但是分页需要点击两次,才能提交,作为弯路
- Inner join,Left join和Right join的区别
- Android 开发中Intent.Action
- 测试信息
- 使用nagios监控指定进程
- 关于C语言存储类
- form提交数据给后台,前端给他需要的值
- socket中的close和shutdown区别
- HTML5 Web存储(Web Storage)技术及用法
- hive日期函数
- ubuntu14.04+cuda8.0(gtx1080)下tensorflow的安装
- Linux系统移植实验---USB驱动的移植
- Android系统Surface机制的SurfaceFlinger服务的线程模型分析
- 使用过滤器,处理404错误
- PHP strtotime指定日期上增加一天