博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2014年10月27日

摘要: 什么是argumentsarguments是是JavaScript里的一个内置对象,它很古怪,也经常被人所忽视,但实际上是很重要的。所有主要的js函数库都利用了arguments对象。所以agruments对象对于javascript程序员来说是必需熟悉的。所有的函数都有属于自己的一个argumen... 阅读全文

posted @ 2014-10-27 10:40 随遇 阅读(248) 评论(0) 推荐(0) 编辑

摘要: 在js中call和apply它们的作用都是将函数绑定到另外一个对象上去运行,两者仅在定义参数方式有所区别,下面我来给大家介绍一下call和apply用法。在web前端开发过程中,我们经常需要改变this指向,通常我们想到的就是用call方法,但是对于call的理解很多人不是很清晰,那么下面小编就给大... 阅读全文

posted @ 2014-10-27 10:15 随遇 阅读(221) 评论(0) 推荐(0) 编辑

2014年10月17日

摘要: loadXML=function(xmlFile){varxmlDoc;if(window.ActiveXObject){xmlDoc=newActiveXObject('Microsoft.XMLDOM');xmlDoc.async=false;xmlDoc.load(xmlFile);}else... 阅读全文

posted @ 2014-10-17 14:59 随遇 阅读(127) 评论(0) 推荐(0) 编辑

2014年10月16日

摘要: 定义:1.函数中嵌套了函数作用:1.闭包可以去读取其他函数内部的变量2.函数中的变量一直保存在内存中 阅读全文

posted @ 2014-10-16 11:16 随遇 阅读(112) 评论(0) 推荐(0) 编辑

2014年6月27日

摘要: 1in = 2.54cm = 25.4 mm = 72pt = 6pc 阅读全文

posted @ 2014-06-27 09:58 随遇 阅读(2282) 评论(0) 推荐(0) 编辑

2014年2月11日

摘要: jQuery.fn.center = function () { this.css(“position”,”absolute”); this.css(“top”, ( $(window).height() – this.height() ) / 2+$(window).scrollTop() + “px”); this.css(“left”, ( $(window).width() – this.width() ) / 2+$(window).scrollLeft() + “px”); return this; } $(element).center(); 阅读全文

posted @ 2014-02-11 14:23 随遇 阅读(238) 评论(0) 推荐(0) 编辑

2014年1月20日

摘要: function WaitingTip (options){ if(!options){ options = { containerElId: null, styleClassName: null, innerHTML:null, anchor:null, gap:null } } var id = options.containerElid ||" ____waiting" + Math.floor(Math.random() * 1000000); this.getWaitEl = function(){ return document.getElementById.. 阅读全文

posted @ 2014-01-20 21:38 随遇 阅读(470) 评论(0) 推荐(0) 编辑

摘要: function loadScript (url, callback){ var script = document.createElement("script"); script.type = "text/javascript"; if(script.readyState){ //IE script.onreadystatechange = function(){ if(script.readyState == "loaded" || script.readState == "complete"){ script 阅读全文

posted @ 2014-01-20 21:28 随遇 阅读(117) 评论(0) 推荐(0) 编辑

摘要: DIV CSS遮罩层 测试 dsfasdfasdsdfsdfsfasdfasdfs 阅读全文

posted @ 2014-01-20 21:19 随遇 阅读(160) 评论(0) 推荐(0) 编辑

2014年1月14日

摘要: byte[] buffer = context.Response.Clear(); context.Response.ClearHeaders(); context.Response.ClearContent(); context.Response.ContentType = "application/pdf"; context.Response.AppendHeader("Content-Disposition", String.Format("inline; filename=xxxx{0}.pdf", DateTime.Now. 阅读全文

posted @ 2014-01-14 09:41 随遇 阅读(140) 评论(0) 推荐(0) 编辑