zoukankan      html  css  js  c++  java
  • ajax传多个值

    function reviewbtnInAll(){
            var count = 0;
            var checkArry=$(".checkboxEach ");
            for (var i = 0; i < checkArry.length; i++) {
                if(checkArry[i].checked == true){
                     count++; 
                    
                     $(this).alertmsg("confirm","您确定要通过这些订单吗?",{title:'确认信息',okName:'确定', cancelName:'取消',okCall:function(){
                                                
                            
                            var strOrderhasselect="",strboundInId="";
                            
                            var arrayOrderhasselect = document.getElementsByName("orderhasselect");
                            for (var i = 0; i < arrayOrderhasselect.length; i++) {                            
                                strOrderhasselect+=arrayOrderhasselect[i].value+",";
                            }
                            var arrayboundInId = document.getElementsByName("boundInId");
                            for (var i = 0; i < arrayboundInId.length; i++) {                            
                                strboundInId+=arrayboundInId[i].value+",";
                            }
                            
                            $.ajax({
                                type: "POST",
                                url: "${BASE_PATH}/admin/financing/examine/examineInStore/applyListBoundIn", 
                                data : "orderhasselect=" + strOrderhasselect+"&boundInId="+strboundInId,
                             success: function(msg){  
                                 $(this).bjuiajax('refreshDiv', "inStore");                             
                                 $(this).alertmsg("ok","操作成功",{title:'成功提示',okName:'确定',okCall:function(){}});
                                }                       
                               })    
                            
                        }});
                     
                }
            }
            
             if( count == 0 ){
                 $(this).alertmsg("warn","您还没有选择订单",{title:'错误提示',okName:'确定',okCall:function(){}});
                }
        }
    View Code

    这里是在项目中的一个多个值传递,其中checkboxEach是一个复选框,对表格中的数据进行多选,orderhasselect、boundInId是需要传给后台的值。

  • 相关阅读:
    Java学习
    Java学习
    Java学习
    Java学习
    Java学习
    Java学习
    Java学习
    springboot之RabbitMQ
    IIS自动发布脚本
    存储器
  • 原文地址:https://www.cnblogs.com/Ljshu/p/7344401.html
Copyright © 2011-2022 走看看