js 获取input file路径改变图像地址
html代码
<img id="newImage" alt="100x100" src="__PUBLIC__/img/1.jpg" class="img-circle" width="100px" height="100px" >
<input id="image" type='file' name='myFile' size='15' onchange="showPicture(this)"/>
js代码
function showPicture(imgFile){
// alert(window.URL.createObjectURL(imgFile.files[0]));
/*获取上传文件的路径*/
document.getElementById("newImage").src = window.URL.createObjectURL(imgFile.files[0]);
}
js 获取input file路径改变图像地址的更多相关文章
- js获取input file路径改变图像地址
版权声明:好歹是我写的或者总结的或者抄的,总待给我个名份吧~ https://blog.csdn.net/sangjinchao/article/details/52250318 html代码 < ...
- js获取input file完整路径的方法
function getPath(){ //判断浏览器 var Sys = {}; var obj = document.getElementById("headImg"); ...
- js获取 input file 图片缩略图
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- js 获取 input file 文件 附给 image src
var a=document.querySelector('input[type=file]'); a.onchange = function (e) { //var reader = new Fil ...
- js获取input file文件二进制码
<html> <body> <img id="image"src=""/> <br/> <input ty ...
- js 获取input type="file" 选择的文件大小、文件名称、上次修改时间、类型等信息
文件名的传递 ---全路径获取 $('#file').change(function(){ $('#em').text($('#file').val()); }); 文件名的传递 ---只获取文件名 ...
- js清空input file的值
原文:js清空input file的值 在做选择本地图片上传的功能时遇到一个问题,第一次点file按钮选择图片完成会触发onchange事件,获取文件后动态在界面上创建img标签展示,但把创建的img ...
- js获取项目根路径
//js获取项目根路径,如: http://localhost:8083/uimcardprj function getRootPath(){ //获取当前网址,如: http://localhost ...
- java 或者 js 获取项目访问路径(域名)
/** * 获得站点url * @return */ public String getWebUrl(){ String url = getRequest().getScheme() + " ...
随机推荐
- Uncaught SyntaxError : Unexpected token ILLEGAL js传递带空格的参数
通常在页面中要让某些内容点击后产生点击事件(非页面跳转)都会使用onclick,但是这样不适于需要传递参数的情况,于是写成直接调用JavaScript函数的方式:<a href=javascri ...
- c#序列化反序列化工具(json,binary,xml)
using System; using System.Text; using System.IO; using System.Runtime.Serialization.Formatters.Bina ...
- 图表插件--jqplot交互演示样例
简单交互 在之前的学习中,我们已经能够绘制各种类型的图表,也能够给图表加入不同的组件,如标题.图例等等.但这些图表仅仅能用于展示数据,一旦希望对图表有所操作--比方查看数据明细--就显得束手无策了.事 ...
- rac 10g 加入节点具体解释
目标: 当前我环境中是有两个节点RAC1和RAC2 节点.如今添加一个RAC3节点. 概要:为现有的Oracle10g RAC 加入节点大致包含下面步骤: 1. 配置新的server节点上的硬件及 ...
- Linux下rar unrar的安装
Linux下rar unrar的安装: 以3.8.0版本为例,如果是64位平台,执行以下命令,也可以去官方网站:)下载最新版: wget http://www.rarlab.com/rar/rarli ...
- [A Top-Down Approach][第二章 应用层]
[A Top-Down Approach][第二章 应用层] 标签(空格分隔): 未分类 网络应用是计算机网络存在的理由 首先从定义几个关键的应用层概念开始 应用程序所需要的网络服务,客户和服务器,进 ...
- angularjs金额大写过滤器
数字转中文 MyAppFilter.filter('rmbFilter',[function(){ function ChinaCost(input){ var numberValue=new Str ...
- <httpProtocol/>配置http协议头
Web.Config中的位置 <configuration> <system.webServer> <httpProtocol> <!--http协议内容-- ...
- Linux Shell脚本入门--(linux空设备文件和重定向)>/dev/null 2>&1
linux空设备文件和重定向 输出/输入重导向 > >> < << :> &> 2&> 2< ...
- 层次查询start with ... connect by
如:select distinct dep_id from t_sys_dep_dimensions start with dep_id = (select dept_id from t_sys_pe ...