function Event(sender) { this._sender = sender;
this._listeners = [];}Event.prototype = { attach : function (listener) {
this._listene...
分类:
Web程序 时间:
2014-06-12 16:38:51
阅读次数:
272
prototype使得js面向对象使用了prototype之后,使用它里面的属性或者函数
需要new出一个对象才可以使用。否则不使用prototype,直接向对象注入 1 function Person(){ 2 3 } 4
Person.prototype.a = 5; 5 Person...
分类:
其他好文 时间:
2014-06-12 16:30:40
阅读次数:
156
原题地址:https://oj.leetcode.com/problems/insert-interval/题意:Given
a set ofnon-overlappingintervals, insert a new interval into the intervals
(merge if ne...
分类:
编程语言 时间:
2014-06-12 16:13:09
阅读次数:
350
js:function iFrameHeight() {var ifm=
document.getElementById("iframepage");var subWeb =document.frames ?
document.frames["iframepage"].document : ifm....
分类:
其他好文 时间:
2014-06-12 16:00:55
阅读次数:
240
1.javascript定义函数的三种方法一、function语句//这个方法比较常用function
fn(){ alert("这是使用function语句进行函数定义");}fn();二、Function()构造函数 var F = new
Function("a","b","alert(a+....
分类:
Web程序 时间:
2014-06-12 15:46:02
阅读次数:
217
原题地址:https://oj.leetcode.com/problems/text-justification/题意:Given
an array of words and a lengthL, format the text such that each line has
exactlyLcha...
分类:
编程语言 时间:
2014-06-12 15:12:05
阅读次数:
296