我在<button>
中有此代码,并且运行脚本来查询数据库中的信息。我想在加载页面时使功能启动,而不必使用按钮,该怎么做?
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) -->