html

<button id="my-btn" onclick="alert('클릭이벤트 발생')";>버튼</button>

js

//JQuery
$("#my-btn").trigger("click");

//javascript
document.getElementById("my-btn")[0].click();

참고

https://6developer.com/6


to Top