Home > php教程 > php手册 > IE下getJSON不工作的解决办法

IE下getJSON不工作的解决办法

WBOY
Release: 2016-06-21 08:49:58
Original
1003 people have browsed it

应该有不少的新童鞋会碰到这个问题,getJson在IE下不工作。。。。。
$.getJSON();
问题出在哪里呢?
原因:IE浏览器会读取第一缓存,只要阻止即可。
var noCache = Date();
$.getJSON("url",{"noCache":noCache},callback)

还有一种解决办法就是用$.ajax()代替

$.ajax({type:"GET",url:"url",dataType:"json",cache:false,callback});

来源:http://bbs.php100.com/read-htm-tid-481956.html



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template