In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to preview the successful picture after layui uploads the picture successfully, it has certain reference value, interested friends can refer to it, I hope you can learn a lot after reading this article, let the editor take you to know about it.
First of all, you should be able to use layui. As shown in the figure, there are three states after submission. When uploading, a large file will be displayed in this step. The third step is to report an error, and the second step is to perform a series of operations after the upload is successful.
Write your own method in the controller to upload the acquired image to the server, then judge whether the upload is successful or not, define some values to judge the return, such as success, define a status.
After receiving the information returned successfully, determine whether there is such a state, and output your operation, such as getting the name of the heart picture after success.
Because such uploads are unprocessed and multiple images are called once each, you can define an empty variable to save the name of each time.
Define to get some returned information, names and saved folders, etc., look at your needs, splice them together if you need to, and plug them back to input for submission.
After success, get the value in input, split the value, split it according to a specific symbol, and then the resulting value for is traversed, and then appended to the element.
Matters needing attention
Note that when you want to write click events, you can use live to control the elements added by jq.
Be careful to intercept it after splicing.
Thank you for reading this article carefully. I hope the article "how to preview successful pictures after uploading pictures on layui" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.