Tunggu DOM memuat JavaScript

document.addEventListener('DOMContentLoaded', (event) => {
  //the event occurred
})
Breakable Bison