实现代码如下:

/* 火狐下取本地全路径 */
function getFullPath(obj)
{
if(obj)
{
//ie
if (window.navigator.userAgent.indexOf("MSIE")>=1)
{
obj.select();
return document.selection.createRange().text;
}
//firefox
else if(window.navigator.userAgent.indexOf("Firefox")>=1)
{
if(obj.files)
{
//return obj.files.item(0).getAsDataURL();
return window.URL.createObjectURL(obj.files[0]);
}
return obj.value;
}
return obj.value;
}
}

以上就是【js 火狐下取本地路径实现思路】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论