Simplify confirm password event binding(js)