<button type="button" id="clearCookies">I'm a button!</button>
And you connect the button to the function with:
document.getElementById("clearCookies").onclick = clearListCookies;
<button type="button" id="clearCookies">I'm a button!</button>
And you connect the button to the function with:
document.getElementById("clearCookies").onclick = clearListCookies;