【发布时间】:2018-04-28 08:43:00
【问题描述】:
location.reload() 在移动设备中无法正常工作...
location.reload() 在桌面浏览器上运行良好,但在移动浏览器 (android) 上运行不正常...
我在 Django 中工作,来自 ajax 选择的 modelchoicefields 查询集的选定文件在 window.location.reload() 之后丢失。 everthing 在台式机上运行良好,但在移动设备上却不行。
我应该更改或添加什么???
你可以看到添加图像的不同...difference between desktop and mobile device working..
代码是 Django 用于动态选择与先前选择相关的字段的标准 ajax 调用...
<script>
function prosecFunction() {
var response = '';
var selected = document.getElementById("id_proje").value;
console.log(selected);
$.ajax({
url : "demirbas_ariza_listesi/",
type : "GET",
dataType: "text",
data : {
'selected' : selected,
},
success: function() {
window.location.reload();
},
failure: function() {
alert("hata var....veri aktarılamadı...");
}
}); /* ajax kapa...*/
}
</script>
<script>
【问题讨论】:
标签: javascript android jquery django jquery-mobile