Reputation: 175
I have this link on my web page:
<a id="demo03" href="#modal-03">DEMO03</a>
How can I make that link run automatically, when I enter my page?
Hope you can help me!
Thanks :-)
Upvotes: 0
Views: 51
Reputation: 2234
Try like this
<html>
<head></head>
<body>
<a id="demo03" href="#modal-03">DEMO03</a>
<script type="text/javascript">
(function() {
var link = document.getElementById('demo03');
link.click();
})();
</script>
</body>
</html>
Upvotes: 3