我想创建一个GET动作,除了现有的GET在不同的签名中我该怎么办? [英] I want to create a GET action addition the existing GET in different signature how could I do it?
问题描述
//这是第一个非常好的GET动作!
public string Get(string carrier,int flightNum,DateTime date,string acNum)
//这是第二次GET行动
public void Get(string isaData)
{
}
//在JS中我用AJAX发送(用于第二次GET动作)它不起作用为什么???:
$(文件).on(点击,#save-button,功能( ){
$ .ajax({
url:WebApiUrl +'Isa',
data:localStorage.getItem(data),
类型:'GET',
contentType:'text / plain',
});
});
//This is the First GET action that works excellent!
public string Get(string carrier, int flightNum, DateTime date, string acNum)
//This is the second GET action
public void Get(string isaData)
{
}
//and in the JS I send in in AJAX(for the second GET action) it doesn't work WHY???:
$(document).on("click", "#save-button", function () {
$.ajax({
url: WebApiUrl + 'Isa',
data: localStorage.getItem("data"),
type: 'GET',
contentType: 'text/plain',
});
});
推荐答案
(文件).on(点击,#save-button,函数(){
(document).on("click", "#save-button", function () {
.ajax({
url:WebApiUrl +'Isa',
数据: localStorage.getItem(data),
类型:'GET',
contentType:'text / plain',
});
});
.ajax({
url: WebApiUrl + 'Isa',
data: localStorage.getItem("data"),
type: 'GET',
contentType: 'text/plain',
});
});
这篇关于我想创建一个GET动作,除了现有的GET在不同的签名中我该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!