dispatchEvent

Trigger events programmatically

Programmatically trigger events. http://stackoverflow.com/questions/2490825/how-to-trigger-event-in-javascript http://stackoverflow.com/questions/809057/how-do-i-programmatically-click-on-an-element-in-firefox

Example

1
2
Result: