.Net Core post传值方式


$('#save').click(function () {
        var obj = {
            "Name": $('#txt_Name').val(),
            "JinE": $('#txt_JinE').val(),
            "ShouYi": $('#txt_ShouYi').val()
        };
        $.ajax({
            url: 'http://localhost:60054/product/insert',
            type: 'post',
            data: obj,
            dataType: 'json',
            contentType: 'application/x-www-form-urlencoded',
            accepts: "application/x-www-form-urlencoded",
            success: function (data) {
                if (data > 0) {
                    alert("添加成功");
                }
                else {
                    alert("添加失败");
                }
            }
        });
    });

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM