This article mainly introduces the problems and solutions encountered in HTML5 to implement simple image upload. Friends who need it can refer to the next one.
Because the front-end upload file must be passed through the form form, and ajax cannot be used. In this way, it is really not good to put an input with type file on a mobile page. As shown in the figure below, is it very frustrating?
After finding the solution, some PCs replaced this input with flash, using jquery tool library such as uploadify, but most mobile browsers do not support flash. So the final method is to use the form form, just set the transparency of the form and input to 0, so that they are in a div with the content being prepared to be displayed, and the content displayed can be made as you want. The code is as follows:
Copy the code