In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "how to use PHP+Ajax to achieve no refresh upload profile picture preview function", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use PHP+Ajax to achieve non-refresh upload profile picture preview function" it!
Upload avatar area
Introduce jQuery library and plupload upload component plupload single picture upload configuration var uploader_avatar = new plupload.Uploader ({/ / Construction method of instance creation runtimes: 'gears,html5,html4,silverlight,flash', / / priority order of which way to initialize the upload plug-in browse_button: [' avatar_uplpad_btn'], / / upload button url: "ajax.php" / / remote upload address flash_swf_url: 'js/plugins/plupload/Moxie.swf', / / flash file address silverlight_xap_url:' js/plugins/plupload/Moxie.xap', / / silverlight file address filters: {max_file_size: '10mbupload, / / maximum upload file size (format 100b, 10kb, 10mb) 1gb) mime_types: [/ / allow file upload types {title: "files", extensions: "jpg,png,gif,jpeg"}]}, multi_selection: false, / / true:ctrl multiple file upload, false single file upload init: {FilesAdded: function (up, files) {/ / uploader_avatar.start before file upload () }, UploadProgress: function (up, file) {/ / upload, showing the progress bar var percent = file.percent; $("#" + file.id) .find ('.bar'). Css ({"width": percent + "%"}); $("#" + file.id) .find (".blank") .text (percent + "%") }, FileUploaded: function (up, file, info) {/ / trigger var data = eval ("(" + info.response + ")") when the file is uploaded successfully; / / parse the returned json data $("# avatar_pic") .html ("
")}, Error: function (up, err) {/ / trigger alert (err.message) when an upload error occurs;}); uploader_avatar.init () Thank you for your reading, the above is "how to use PHP+Ajax to achieve no refresh upload profile picture preview function" of the content, after the study of this article, I believe you on how to use PHP+Ajax to achieve no refresh upload profile picture preview function of this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.