Simply us a javascript function and call onchange of file type and put id as given in the function Input type file validation using javascript:
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.