For a website I\'m doing, I want to load one div, and hide another, then have two buttons that will toggle views between the div using JavaScript.
This is my
Set your HTML as
Numbers
Body 1
And now set the javascript as
function changeDiv()
{
document.getElementById('body').hidden = "hidden"; // hide body div tag
document.getElementById('body1').hidden = ""; // show body1 div tag
document.getElementById('body1').innerHTML = "If you can see this, JavaScript function worked";
// display text if JavaScript worked
}