Preview images before upload

后端 未结 8 1815
不思量自难忘°
不思量自难忘° 2020-12-02 09:27

I have a page with four images for the user to select. I want the user to be able to preview each image on the site before upload.

The JavaScript code below works fo

8条回答
  •  生来不讨喜
    2020-12-02 09:59

    function appendRows(){
        $i++;
        var html='';
        html+='
    '; $("#appendshow").append(html); } function appendloadFile(i){ var appendoutput = document.getElementById('outputshow'+i+''); appendoutput.src = URL.createObjectURL(event.target.files[0]); }

提交回复
热议问题