03 2014 档案
摘要:jQuery IE缓存问题解决方法:1.在AJAX请求的页面后加个随机函数,我们可以使用随机时间函数 在javascript发送的URL后加上t=Math.random() 例如这样:URL+”&”+”t=”+Math.random();或者new Date(); 在URL参数后加上 “?timestamp=” + new Date().getTime();2.$.ajaxSetup({cache:false})设置全局ajax变量,将cache设为false 这样页面中所有的ajax请求时,都执行这个。就不必改很多地方。。。
阅读全文
摘要://日期转换 function ChangeDateFormat(time) { if (time != null) { var date = new Date(parseInt(time.replace("/Date(", "").replace(")/", ""), 10)); var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; var ...
阅读全文

浙公网安备 33010602011771号