How to get the file path from HTML input form in Firefox 3

前端 未结 8 1879
臣服心动
臣服心动 2020-11-22 02:12

We have simple HTML form with , like shown below:

8条回答
  •  萌比男神i
    2020-11-22 02:23

    For preview in Firefox works this - attachment is object of attachment element in first example:

               if (attachment.files)
                 previewImage.src = attachment.files.item(0).getAsDataURL();
               else
                 previewImage.src = attachment.value;
    

提交回复
热议问题