search

Home  >  Q&A  >  body text

javascript - Will the page automatically refresh after taking a photo on the mobile terminal? ? Has anyone encountered it?

<input type="file" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
为情所困为情所困2705 days ago1125

reply all(3)I'll reply

  • 迷茫

    迷茫2017-07-05 10:56:39

    The memory of the mobile phone is too small.

    reply
    0
  • 滿天的星座

    滿天的星座2017-07-05 10:56:39

    This situation often happens. What usually happens is that you need to read the file content (such as reading pictures and displaying them). My solution is to get a setTimeout.
    For example:

    file.onchange = function(){
        var files = file.files;
        setTimeout(function(){
            //这里干别的
        },100);
    };

    Although it can’t be completely avoided, it can be alleviated a lot. As long as you don’t operate too quickly after taking pictures, there is generally no problem

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-07-05 10:56:39

    It should be that the memory is too small.

    When you take a photo, try to enlarge the screen (digital zoom, enlarge the screen area, zoom to the maximum). The photo file will be very small. If the browser does not refresh the page, it means that the previous refresh was due to the phone memory. too small.

    reply
    0
  • Cancelreply