I'm passing content to my page using a div and the innerHTML attribute, but if a visitor presses the back button they will most likely leave the site (because it's all on one page). How can I keep this from happening? I was thinking something like onUnload=function()
function() {
if(document.location.history(-1)=true){
document.loaction.history(+1)
}
}
I know that doesnt work but is there a similar way?
function() {
if(document.location.history(-1)=true){
document.loaction.history(+1)
}
}
I know that doesnt work but is there a similar way?