Basically, I\'m trying to make a link that, when pressed, will hide the current body div tag and show another one in its place, unfortunately, when I click the link, the fir
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
}
Check, it works.