How do I pass variables from a post function in jquery to the claim controller?
I have 2 variables that I would like to add to a post fu开发者_运维问答nction. How do I do this?
$.post('/Home/AddContent/', function (response) {
alert("success");
}, 'json');
jQuery.post(
url,
[ data ],
[ success(data, textStatus, XMLHttpRequest) ],
[ dataType ]
)
this is the usage of jquery post. take the "data" option
try
$.post(
'/Home/AddContent/', //URL
'variable1=' + uriEncodeComponent(value1), //Data
function(jsonObject, t, j)){ //Success
alert('success');
},
'json' //Datatype
);
精彩评论