js获取fileinput中得路径
作者:
yundGo | 来源:发表于
2016-11-20 20:32 被阅读0次var url;
if (navigator.userAgent.indexOf("MSIE")>=1) { // IE
url = document.getElementById("img_input").value;
} else if(navigator.userAgent.indexOf("Firefox")>0) { // Firefox
url = window.URL.createObjectURL(document.getElementById("img_input").files.item(0));
} else if(navigator.userAgent.indexOf("Chrome")>0) { // Chrome
url = window.URL.createObjectURL(document.getElementById("img_input").files.item(0));
}
本文标题:js获取fileinput中得路径
本文链接:https://www.haomeiwen.com/subject/kayypttx.html
网友评论