After you remove the comments via Javascript, they will still be visible in View Source since it shows the source from before the Javascript ran.
If you don't want comments to be visible to the user, don't use HTML comments. Use comments in a serverside language inside the server-side blocks. Like:
<%
//comment: printing variable x
out.print(x);
%>