Once you have selected an element you can call click()
document.getElementById('link').click();
see: https://developer.mozilla.org/En/DOM/Element.click
I don’t remember if this works on IE, but it should. I don’t have a windows machine nearby.
More Related Contents:
- event.preventDefault() vs. return false
- What is DOM Event delegation?
- window.onload vs document.onload
- Why calling setState method doesn’t mutate the state immediately?
- Detecting Browser Autofill
- How do I add a simple onClick event handler to a canvas element?
- When should I use jQuery’s document.ready function?
- jQuery checkbox checked state changed event
- jQuery checkbox change and click event
- DOM event precedence
- Javascript event handler with parameters
- How to removeEventListener that is addEventListener with anonymous function?
- event.preventDefault() vs. return false (no jQuery)
- Handle URL fragment identifier (anchor) change event in Javascript
- Accessing an object’s property from an event listener call in JavaScript
- Alternative to jQuery’s .toggle() method that supports eventData?
- Need to cancel click/mouseup events when double-click event detected
- How do you handle oncut, oncopy, and onpaste in jQuery?
- Why is ‘event’ available globally in Chrome but not Firefox?
- Handling “onclick” event with pure JavaScript
- How to unbind a specific event handler
- Preserve ‘this’ reference in javascript prototype event handler [duplicate]
- React.js Serverside rendering and Event Handlers
- jQuery .on(); vs JavaScript .addEventListener();
- visibilitychange event is not triggered when switching program/window with ALT+TAB or clicking in taskbar
- Detect scroll direction in React js
- button onclick function firing twice
- Form submitted using submit() from a link cannot be caught by onsubmit handler
- How can I remove a JavaScript event listener?
- javascript click event handler fires without clicking