<div id="autoclickme">
  <a onclick="myFunction()">Onload Autoclick me</a>
</div>
function myFunction() {
    alert("Hello World");
}
$(document).ready(function () {
    $('#autoclickme a').click();
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js