I have a <a href> in my code which is as follows

<a href="javascript:editPage();">[Edit mode]<br></a>
My requirement is , when I click on that link [Edit mode] it will not be visible anymore. But ofcourse the javascript function editPage() will get successfully
executed so that my purpose is served.

Currently the problem is after clicking that link, the function is executed successfully but the link does not disappear.

Please help. Thanks.