clear javascript without jquery and the other js libraries