zoukankan      html  css  js  c++  java
  • post传参数 传json格式参数

    如下:
    const dataObject = JSON.stringify({
                                            "base64str": data.data,
                                            "reportId": reportId,
                                            "userId": userId
                                            });
    $.post({
                              url: 'http://192.168.81.157:5000/api/imageApp/v0/CaptureImage',
                              contentType: 'application/json',
                              data:dataObject,
                              success:function(json){
                                console.log(json)
                              },
                              error:function(){
                                  console.log("出错了")
                              }
                            });
  • 相关阅读:
    javascript中获取dom元素高度和宽度
    $.ajax()方法详解
    JQ中$(window).load和$(document).ready区别与执行顺序
    第几个幸运数
    乘积尾零
    星期一
    分数
    卡片换位
    冰雹数
    打印方格
  • 原文地址:https://www.cnblogs.com/iwen1992/p/12104407.html
Copyright © 2011-2022 走看看