<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<input accept="image/*" name="upimage" id="upload_file" type="file">
<textarea id="base64_output" name="Word" style=" width:820px"></textarea>
<script type="text/javascript">
document.getElementById("upload_file").onchange = function () {
gen_base64();
};
function $_(id) {
return document.getElementById(id);
}
function gen_base64() {
var file = $_('upload_file').files[0];
r = new FileReader(); //本地预览
r.onload = function(){
$_('base64_output').value = r.result;
}
r.readAsDataURL(file); //Base64
}
</script>
</body>
</html>

最新文章

  1. 论php数组合并
  2. MySQL_订单类型细分_20161222
  3. Supercell only provide the best games for players
  4. Spring MVC 指导文档解读(一)
  5. 在delphi下TClientSocket的使用技巧 转
  6. 使用U盘在X230上安装Mavericks/Win7-黑苹果之路
  7. 使用DataSet数据集插入记录
  8. 解析Function.prototype.bind
  9. Salt状态管理
  10. php学习笔记——基础知识(1)
  11. JAVA字符串操作 (转)
  12. grunt+bower依赖管理
  13. Spark Streaming 调优指南
  14. 201521123024 《Java程序设计》第1周学习总结
  15. 新概念英语(1-113)Small Change
  16. WC.exe【C】
  17. Nginx服务器的图片防盗链
  18. ROC曲线(Receiver Operating Characteristic Curve)
  19. 题目1454:Piggy-Bank(完全背包问题)
  20. Postgresql 創建觸發器,刪除觸發器和 禁用觸發器

热门文章

  1. 对drf视图集的理解
  2. gettimeofday
  3. 2018-2019 20165226 Exp7 网络欺诈防范
  4. PCA简单实现
  5. LinkedList简要分析
  6. EasyMock set方法报错: java.lang.AssertionError
  7. 从setTimeout谈js运行机制
  8. Javac的命令(-Xlint)
  9. python-pymongo使用
  10. Mysql日期类型大小比较---拉取给定时间段的记录