How does one enable users to select images in the file domain and then display them dynamically?

Source: Internet
Author: User
How can users select images in the file domain and then display them dynamically? Many websites on the Internet have the upload Avatar function. after selecting a file in the file domain, it can be displayed on the webpage before submission. but how can this problem be achieved? In other words, images on the Internet should be server resources. but how can this function be implemented? Please give a detailed explanation or how to make sure that the user selects an image in the file domain and then displays it dynamically?
Many websites on the Internet have the upload Avatar function. after selecting a file in the file domain, it can be displayed on the webpage before submission. but how can this problem be achieved?

In other words, images on the Internet should be server resources. but how can this function be implemented?

Please give us a detailed explanation or detailed PHP code !!

------ Solution --------------------
Discussion

No, for example, renrenren is actually uploaded and displayed to the user. you can manually take part of the image and save and publish it. However, the upload is an ajax upload, so it does not seem to have been uploaded. Although the upload is complete, it is not saved until the user clicks "save" and then saves it in the background, but the image is already in the background. you can see the url of the image.

------ Solution --------------------
After jq is selected, you can view the image without uploading it.
------ Solution --------------------
AlphaImageLoader in IE
FileReader for other browsers with html features

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.