码迷,mamicode.com
首页 > 其他好文 > 详细

addEventListener

时间:2014-09-02 14:03:54      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   ar   div   cti   log   sp   

function Person() {
    this.init()
}
Person.prototype = {
    constructor: Person,
    init: function() {
        document.documentElement.addEventListener(‘click‘, this, false)
    },
    handleEvent: function(event) {
        this.say()
    },
    say: function() {
        alert(‘hello world!‘)
    }
}

var person = new Person()

 

addEventListener

标签:style   blog   color   io   ar   div   cti   log   sp   

原文地址:http://www.cnblogs.com/jzm17173/p/3951252.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!