/* javascript for html, CSS and JS template
   Copyright by Anthony Vogelaar, Perth UK
   rev 0.10  2025-02-27  Initial release */

// ====================== Global variables and events ======================

const header = document.getElementById("header")

document.getElementById("btn1").addEventListener("click", onBtnClick)
document.getElementById("btn2").addEventListener("click", onBtnClick)
document.getElementById("btn3").addEventListener("click", onBtnClick)
document.getElementById("btn4").addEventListener("click", onBtnClick)

// =============================== domain =================================

function onLoad(ev) {
   console.log('running .....')
}


function onBtnClick(ev) {
   let id = this.id
   header.innerText = id
}

// ============================== start ===================================

window.addEventListener("load", onLoad)

// ============================== end =====================================
