Input addEventListener on change not firing

前端 未结 2 1402
再見小時候
再見小時候 2021-01-26 05:59

I have a single input to upload a image.

html

2条回答
  •  有刺的猬
    2021-01-26 06:35

    change this.imageInput.addEventListener("change", this.uploadImage()); to this.imageInput.addEventListener("change", this.uploadImage); ( removed the () after this.uploadImage ).

提交回复
热议问题