获取输入框的内容 把这个值 给wx。request 中的 Data用 怎么写?

小程序 文章 2020-08-28 09:41 527 0 全屏看文

AI助手支持GPT4.0

获取输入框的内容 把这个值 给wx。request 中的 Data用 怎么写?Get the content of the input box and give this value to wx. How to write Data in request?

获取输入框的内容 把这个值 给wx。request 中的 Data用 怎么写?

大哥们 我想写个 输入框 然后获取输入框的内容 把这个值 给wx。request 中的 Data用 求大佬给个完整的代码 我太小白了 参数传递不过来

就是 比如 我 int a;

a=输入框的内容;

wx.request({

url:“http://www.wxwoaini.”+a+“com”

data:a

})

Man, I want to write an input box and get the content of the input box and give this value to Wx. I'm too small to pass the data in the request for a complete code from the boss. For example, I'm int a; a = the content of the input box; wx.request ({ url:“http:// www.wxwoaini. ”+a+“com” data:a })

回答:

夕阳西下?:

算了:如果wxrequest再另一个子程序里 怎么调用这个data 哥
จุ๊บ:

X和Y 为参数名(自定义),后面对应的就是参数值

算了:大哥 我想从输入框里获取值付给x 这个怎么写
K:
wx.request({  url: "https:"method: "get",   data: {      "参数A": a,      "参数B": b    },  header: {   "Content-Type": "application/json"  },  success: function(e){  },  fail: function(err){  }})
算了:参数我想从另一个子程序里调用 就是获取输入框的值 是一个子程序 wxrequest在一个按钮下

-EOF-

AI助手支持GPT4.0