XiaoGer
 1 <img id="image1"/>
 2 <input id="f1" class="easyui-filebox" name="file1" style="width:300px" data-options="
 3     prompt:\'Choose a file...\',
 4     onChange: function(value){
 5         var f = $(this).next().find(\'input[type=file]\')[0];
 6         if (f.files && f.files[0]){
 7             var reader = new FileReader();
 8             reader.onload = function(e){
 9                 $(\'#image1\').attr(\'src\', e.target.result);
10             }
11             reader.readAsDataURL(f.files[0]);
12         }
13     }">

 

分类:

技术点:

相关文章:

  • 2021-12-18
  • 2021-11-11
  • 2021-12-24
  • 2021-09-21
  • 2021-09-21
  • 2021-09-13
  • 2021-11-23
  • 2021-11-23
猜你喜欢
  • 2021-09-21
  • 2021-09-21
  • 2021-09-21
  • 2021-09-07
  • 2021-10-30
  • 2021-04-07
  • 2021-12-02
相关资源
相似解决方案