Yes, JavaScript to code the logic for the dynamic CSS property changes on display:none and display:block. That way you have the full HTML document always loaded in the browser, and don’t loose any entered field values when switching tabs, and of course it’s also much faster for the user (and the server).
Each tab page (=section on the one-page HTML document) should be enclosed within a DIV tag, so you can easily just hide or display that DIV ID when the corresponding tab is clicked.