• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
fordouble
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2017年6月12日

两种方式实现图片上传在线预览
摘要: 1 //preview img : filereader方式 2 document.getElementById('imgFile').onchange = function(e){ 5 var ele = document.getElementById('imgFile').files[0]; 6 8 var fr = new FileReade... 阅读全文
posted @ 2017-06-12 17:08 fordouble 阅读(603) 评论(0) 推荐(0)
 
关于input file img实时预览获取文件路径的问题
摘要: 要做图片上传嘛,肯定要做实时预览。贴代码算了; <div class="btn"> <input type="button" name="upload" id="upload" value="上傳" /> <input type="text" name="filename" id="filename 阅读全文
posted @ 2017-06-12 16:57 fordouble 阅读(278) 评论(0) 推荐(0)
 
关于input file 改样式的操作方式
摘要: 最近项目要做那个什么,文件上传和图片上传,只能用 input file 了,这个input file 有点丑,需要改样式。 我是这么做的: <div class="btn"> <input type="button" name="upload" id="upload" value="上傳" /> < 阅读全文
posted @ 2017-06-12 15:05 fordouble 阅读(262) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3