N
Size: a a a
N
АЕ
DT
АЕ
АЕ
ᅠᅠ
<script>
window.onbeforeunload = function() {
let text = 'exit'
console.log(text);
$.ajax({
url: 'test/',
data: {
'text': text
},
);
};
</script>
DT
<script>
window.onbeforeunload = function() {
let text = 'exit'
console.log(text);
$.ajax({
url: 'test/',
data: {
'text': text
},
);
};
</script>
ᅠᅠ
MS
DT
ᅠᅠ
def test(request):
#if request.is_ajax():
param = request.POST.get('text','Fail')
print(param)
return HttpResponse(param)
ᅠᅠ
path('test/', test, name="test"),
MS
<script>
window.onbeforeunload = function() {
let text = 'exit'
console.log(text);
$.ajax({
url: 'test/',
data: {
'text': text
},
);
};
</script>
ᅠᅠ
window.onbeforeunload = function() {
let text = 'exit'
console.log(text);
$.post({
url: 'test/',
data: {
'text': text
},
);
};
ᅠᅠ
ᅠᅠ
DT
ᅠᅠ
DT
ᅠᅠ