Let's take a look at the JSP code:
Bytes ---------------------------------------------------------------------------------------------------------------
<Tr>
<TD align = "right"> attachment upload: </TD>
<TD> <input type = "file" name = "myfile" id = "myfile" label = "select file"/> </TD>
</Tr>
Bytes -----------------------------------------------------------------------------------------------------------------
VaR myfile = $ ("# myfile"). Val ();
Alert (myfile );
No matter how the file is selected, the output result is: C: \ fakepath \......
Bytes -----------------------------------------------------------------------------------------------------------------
When I used IE8, I did not expect that the function of previewing local images with Javascript in the upload of images on a website is invalid. The image is always displayed incorrectly and alert () is used () after reading the film, the path becomes c: \ fakepath \*. JPG. The actual path is replaced by c: \ fakepath. After research, it turns out that IE8 has added security options. By default, the real path of the uploaded file is not displayed. Go to the Internet option and modify the settings to display the real file path.
The procedure is as follows:
Tools-> Internet Options-> Security-> Custom Level-> Find "include local directory path when uploading local files to the server" in "others", and select "enable,