blog.js (262B)
1 function load(path) { 2 const prev = document.getElementById("mainbody").innerHTML; 3 fetch("http://users.aber.ac.uk/lus53/cs10120/" + path) 4 .then((response) => response.text()) 5 .then((html) => { 6 document.getElementById("mainbody").innerHTML = html; 7 }) 8 }