No refresh file upload, refresh file upload
No refresh file upload
ajax’s FormData object completes no refresh operation
ajax level 2 standard can operate on files, but only supports new browsers (not compatible with lower versions of IE), and is an H5 standard
Notes:
b) css settings
c) Set up monitoring file upload events
To monitor ajax operations through onreadystatechange
Send an ajax request (Note: You do not need to set the ajax request header when using FormData to complete data upload)
Use the event source (uploaded file) in onprogress to display progress
The server data.php file implements uploaded file processing
iframe implements refresh-free upload
Create an index.php file and set the upload domain
Technical point 1: You need to set the window opened by form submission to an iframe defined by yourself
Technical point 2: The generated image needs to be processed in the data.php file, and then the image URL address is returned. Use top to get the window to open the current iframe, and modify the src attribute of the img tag.
2. data.php completes saving and returning images
http://www.bkjia.com/PHPjc/1119776.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1119776.htmlTechArticleNo refresh file upload, refresh file upload no refresh file upload ajax's FormData object completes no refresh operation ajax level 2 standard File operations can be performed, but only new browsers are supported...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn