Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 JavaScript 或 jQuery 中模拟 click、mousedown、mouseout 等事件?
使用触发方式
$(element).trigger('click');
更多信息:http ://api.jquery.com/trigger/
事件可以附加到 HTML 页面中的每个元素。查看以下链接以更好地了解事件。
http://www.w3schools.com/js/js_htmldom_events.asp