var o, elem = // ссылка на элемент
if ( document.createEvent ) {
o = document.createEvent( "MouseEvent" );
o.initMouseEvent( 'click', true, true, null, 0, 0, 0, 0, 0, false, false, false, false, 1, null );
elem.dispatchEvent( o );
} esle {
o = document.createEventObject();
o.type = "click";
elem.fireEvent( 'onclick', o );
}
|