此例是触发了双击事件
1
function
dblEvt(el){
2 if (document.all){
3 el.fireEvent('ondblclick');
4 } else {
5 var evt = document.createEvent( " MouseEvents " );
6 evt.initEvent( " dblclick " , true , true );
7 el.dispatchEvent(evt);
8 }
9 }
2 if (document.all){
3 el.fireEvent('ondblclick');
4 } else {
5 var evt = document.createEvent( " MouseEvents " );
6 evt.initEvent( " dblclick " , true , true );
7 el.dispatchEvent(evt);
8 }
9 }