Form input autocompletion with pure javascript