摘要: Java 代码 设置response header response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); response.setHead... 阅读全文
posted @ 2015-05-09 10:46 rubekid 阅读(114) 评论(0) 推荐(0) 编辑
摘要: String address = "http://sports.sina.com.cn/nba/live.html?id=2015050405"; URL url = new URL(address); HttpURLConnection connecti... 阅读全文
posted @ 2015-05-05 08:43 rubekid 阅读(1451) 评论(0) 推荐(0) 编辑
摘要: !!的作用是把一个其他类型的变量转成的bool类型 阅读全文
posted @ 2015-04-20 15:34 rubekid 阅读(133) 评论(0) 推荐(0) 编辑
摘要: (function() { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; for (var x = 0; x < vendors.length && !window.requestAnimationFra... 阅读全文
posted @ 2015-04-18 12:09 rubekid 阅读(350) 评论(0) 推荐(0) 编辑
摘要: function fakeClick(fn) { var $a = $(''); $a.bind("click", function(e) { e.preventDefault(); fn(); }); $("body").append($a)... 阅读全文
posted @ 2015-04-10 14:58 rubekid 阅读(139) 评论(0) 推荐(0) 编辑
摘要: /** * 文件加载进度管理 */ DownloadUtils = function(options){ options = options || {}; this.init(options); }; DownloadUtils... 阅读全文
posted @ 2015-04-08 10:03 rubekid 阅读(351) 评论(0) 推荐(0) 编辑
摘要: var prefix = (function () { var styles = window.getComputedStyle(document.documentElement, ''), pre = (Array.prototype.slice .call(styles) ... 阅读全文
posted @ 2015-03-18 21:17 rubekid 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 在IE7下,进行append操作时,会把像的src补成完整路径。对于上传到临时目录的图片,提交到后台要进行路径判断的情形要十分注意。 阅读全文
posted @ 2015-02-11 09:56 rubekid 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 方式一(function(){ /** * 摇一摇 * @author rubekid */ function Shake(options){ this.init(options); } Shake.prototype ... 阅读全文
posted @ 2015-02-10 15:55 rubekid 阅读(256) 评论(0) 推荐(0) 编辑
摘要: (function($){ var methods = { init:function(options){ return this.each(function(){ var $this = $(this); var $clone = $this.clone(); var settings = $.e 阅读全文
posted @ 2015-02-09 11:36 rubekid 阅读(3993) 评论(0) 推荐(0) 编辑