上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
  2014年9月12日
摘要: 一、实现一个遍历数组或对象里所有成员的迭代器。var each = function(obj, fn){ //+++++++++++答题区域+++++++++++ //+++++++++++答题结束+++++++++++};try{ ... 阅读全文
posted @ 2014-09-12 11:27 鬼畜十三 阅读(150) 评论(0) 推荐(0) 编辑
  2014年9月4日
摘要: var animal=function(name){ //构造函数 this.name=name; this.sayhello=function(){ alert("hi我是"+this.name); };}animal.prototype.shout=functi... 阅读全文
posted @ 2014-09-04 17:41 鬼畜十三 阅读(164) 评论(0) 推荐(0) 编辑
  2014年9月3日
摘要: 重载是面向对象语言里很重要的一个特性,JS中没有真正的重载,是模拟出来的(因为js是基于对象的编程语言,不是纯面向对象的,它没有真正的多态:如继承、重载、重写)一、什么时候用重载?举例:function getDataTop10(){ alert("返回前10条数据");}后来需求改了,需要获... 阅读全文
posted @ 2014-09-03 16:42 鬼畜十三 阅读(397) 评论(0) 推荐(0) 编辑
  2014年8月29日
摘要: 一.call函数a.call(b);简单的理解:把a对象的方法应用到b对象上(a里如果有this,会指向b)call()的用法:用在函数上面var Dog=function(){ this.name="汪星人"; this.shout=function(){ alert(this.nam... 阅读全文
posted @ 2014-08-29 17:56 鬼畜十三 阅读(204) 评论(0) 推荐(0) 编辑
  2014年8月25日
摘要: 1.overflow-x是css2还是css3的属性【解析】overflow是css2的属性,overflow-x和overflow-y是css的属性2.css实现每个单词第一个字母大写【解析】text-transform:capitalize3.jQuery 中 $('.class')和$('di... 阅读全文
posted @ 2014-08-25 18:07 鬼畜十三 阅读(202) 评论(0) 推荐(0) 编辑
  2014年8月13日
摘要: 一."this"公理this关键字永远都指向函数(方法)的所有者;function fn1(){ this};fn1(); this=>windowoDiv.onclick=fn1; this=>oDivoDiv.onclick=function(){ this ... 阅读全文
posted @ 2014-08-13 16:18 鬼畜十三 阅读(242) 评论(0) 推荐(0) 编辑
  2014年8月8日
摘要: 一.Js对象1.如何根据逗号分隔的字符串创建数组呢?请为下面的字符串创建一个数组,并访问第三个元素:"cats,dogs,birds,horses"知识点:数组和字符串的转换。考察split() 方法。把一个字符串分割成字符串数组(将字符串按某个字符切割成若干个字符串,并以数组形式返回)var an... 阅读全文
posted @ 2014-08-08 16:07 鬼畜十三 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 在线工具 http://tool.chinaz.com/Tools/JsFormat.aspx 阅读全文
posted @ 2014-08-08 11:48 鬼畜十三 阅读(237) 评论(0) 推荐(0) 编辑
  2014年8月5日
摘要: 1.if (!("a" in window)) { var a = 1;}alert(a);【分析】代码含义:如果window不包含属性a,就声明一个变量a并赋值为1①Js引擎会先扫描所有的变量声明②所有的全局变量都是window的属性③变量声明和赋值一起用时,Js引擎会自动将它分成两部分:变... 阅读全文
posted @ 2014-08-05 16:50 鬼畜十三 阅读(364) 评论(0) 推荐(0) 编辑
  2014年8月1日
摘要: $(window).load(function(e){ waterfall(); var dataInt={'data':[{'src':'1.jpg'},{'src':'2.jpg'},{'src':'3.jpg'},{'src':'4.jpg'}]}; $(window).scroll(func... 阅读全文
posted @ 2014-08-01 17:06 鬼畜十三 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页