I have this code with <button>
and I run a script to query information in a database. I would like to make the function start when loading the page without having to use the button, how to do it?
button {
font-size: 1rem;
font-weight: 600;
line-height: 1.5;
display: inline-block;
padding: .625rem 1.25rem;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
text-align: center;
vertical-align: middle;
white-space: nowrap;
border: 1px solid transparent;
border-radius: .25rem;
color: #fff;
border-color: #5e72e4;
background-color: #5e72e4;
box-shadow: 0 4px 6px rgba(50, 50, 93, .11), 0 1px 3px rgba(0, 0, 0, .08);
cursor: pointer;
}
<button onclick="gtaller_modal();" id="gtaller_modal" data-gt-ventana="1">Button Text</button>
<script src="https://gestioo.com/gwidget/js/gtaller_modal.min.js"></script>
<!-- Confiugracion: data-gt-ventana="1" //Ventana nueva (0/1) -->