Corrected HTML + JS code to suit the working principles of changePage() method