开发者

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
);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜