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请求时,都执行这个。就不必改很多地方。。。 阅读全文
posted @ 2014-03-12 17:11 beau 阅读(289) 评论(0) 推荐(0)
摘要://日期转换 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 ... 阅读全文
posted @ 2014-03-04 15:28 beau 阅读(382) 评论(0) 推荐(0)