document.addEventListener("DOMContentLoaded", function() { document.getElementById('test').innerText = "Hello world!"; });