I know that when using jQuery you can do $(\'element\').click(); to catch the click event of an HTML element, but how do you do that with plain Javascript?
$(\'element\').click();
document.getElementById('element').onclick = function(e){ alert('click'); }
DEMO: http://jsfiddle.net/e9jZW/1/