How to return to home page using javascript?

javascript

Solution

Add .href:

function gohome()
{
window.location.href="../index.html"
}

Problem

i am a newbie to jscript. i have used this code in javascript to return to home page ``` function gohome() { window.location="../index.html" } ``` and i am calling that function in this code ``` '<a accesskey="h" id="home" href="javascript:gohome();">Home<\/a>' + ``` there will be link on a page when it is clicked it will call gohome() function. but same link is appearing on the index page.when clicked it is showing page not found. How to make this link hide in index.html page? Can anyone help me??

Original source