美文网首页
Get filename in file input field

Get filename in file input field

作者: hzmangel | 来源:发表于2017-08-03 14:12 被阅读11次
    <script>
    $('#file').on('change', function(e) {
      console.log(e.target.files[0]);
    })
    </script>
    <input type='file' id='file'>
    

    Which is a file object, check this page for detail things.

    相关文章

      网友评论

          本文标题:Get filename in file input field

          本文链接:https://www.haomeiwen.com/subject/kflplxtx.html