0
投稿機能に追加したい変数が2つあります。これはどうすればいいですか?jqueryのポスト関数からクレームコントローラに変数を渡すにはどうすればよいですか?
$.post('/Home/AddContent/', function (response) {
alert("success");
}, 'json');
投稿機能に追加したい変数が2つあります。これはどうすればいいですか?jqueryのポスト関数からクレームコントローラに変数を渡すにはどうすればよいですか?
$.post('/Home/AddContent/', function (response) {
alert("success");
}, 'json');
jQuery.post(
url,
[ data ],
[ success(data, textStatus, XMLHttpRequest) ],
[ dataType ]
)
これはjqueryのpostの使用です。 "データ" オプション
$.post(
'/Home/AddContent/', //URL
'variable1=' + uriEncodeComponent(value1), //Data
function(jsonObject, t, j)){ //Success
alert('success');
},
'json' //Datatype
);
を試してみてくださいを取ります