I have a <input type="file" id="uploadPicture" value="123">
When I’m using: alert($("#uploadPicture").val());
It alerts an empty dialog.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can read it, but you can’t set it.
value="123"will be ignored, so it won’t have a value until you click on it and pick a file.Even then, the value will likely be mangled with something like
c:\fakepath\to keep the details of the user’s filesystem private.