skip to Main Content

Javascript – JS var with multiple values

Something I can't understand : I got a function opening the same page <div id="page"> but with different contents depending the clicked button in menu: <nav> <button onclick="openPage(1)">PAGE 1</button> <button onclick="openPage(2)">PAGE 2</button> <button onclick="openPage(3)">PAGE 3</button> </nav> Then the function: function…

VIEW QUESTION
Back To Top
Search