Search

10/13/2009

fireEvent


obj.fireEvent = function(el, E) {
if (document.createEvent) {
var ev = document.createEvent('Events');
ev.initEvent(E, true, true);
el.dispatchEvent(ev);
} else if (el.fireEvent) {
el.fireEvent('on'+E);
}
}

沒有留言: