zoukankan      html  css  js  c++  java
  • ajax data数据里面传一个json到后台的写法

    $.ajax({
                    url:url+"/crm/contact",
                    type:'PUT',
                    contentType: "application/json",
                    timeout : "3000",
                    cache:false,
                    data: JSON.stringify({
                        "id":n,
                        "name":$('.pop_name').val(),
                        "phone":$('.pop_phone').val(),
                        "email":$('.pop_email').val(),
                        "position":$('.pop_position').val(),
                        "enterprise": {'id': 1}
                    }),
                    dataType: "json",
                    success:function(str){
                        //弹窗关闭
                        $('.pop').hide();
                        window.location.reload();
                    },
                    error:function(err){
                        alert("数据刷新失败,请重新刷新");
                    }
                });

    转自:http://www.cnblogs.com/shiyou00/p/5687553.html

  • 相关阅读:
    单例模式
    js事件
    oracle_to_excel
    jquery_2
    jquery_1
    4.linux 复制,删除,重命名
    一个tomcat下部署多个springboot项目
    3.centos7 安装oracle
    桥接模式
    组合模式
  • 原文地址:https://www.cnblogs.com/sweeeper/p/6106186.html
Copyright © 2011-2022 走看看