Title
{% csrf_token %}
Ajax提交
function ajaxSubmit() {
$.ajax({
url: 'icbc.html',
type: 'POST',
data: {'k1': 'v1', 'k2': 'v2', 'csrfmiddlewaretoken': $('input[name="csrfmiddlewaretoken"]').val()},
success: function (arg) {
console.log(arg)
}
})
}
Title
{% csrf_token %}
Ajax提交
function ajaxSubmit() {
$.ajax({
url: 'icbc.html',
type: 'POST',
data: {'k1': 'v1', 'k2': 'v2', 'csrfmiddlewaretoken': $('input[name="csrfmiddlewaretoken"]').val()},
success: function (arg) {
console.log(arg)
}
})
}