<div class="dashed_1"> <input onchange="readURL(this)" class="cool_inp" id="img" type="file" accept=".jpg, .jpeg, .png"> <label class="pseudolabel" for="img"><b>+ Загрузить</b></label> <p>Или перетяните картинку сюда</p> </div> 

there is for example a code, it is necessary that within the block of the dashed_1 class, if you drag an image onto it, so that it loads as via a button .. How can I implement it? How to track such an event?

  • one
    Drag and Drop API, File API, Canvas / Image API, fetch \ web socket - user33274
  • habr.com/post/136694 already chewed it - user33274
  • @ MaksimLensky read the article, but didn’t do it the way he wanted, didn’t find - how to link the field where the file is being moved to the input - so that when the file was released - he called change in a specific input and inserted the file into it - shumik_UA
  • one
    at the very top it is written in order - from 1 to 4 you need to apply everything ... I am not sure with only 4 points - as I did just like that - indulging - user33274

0