87,910
社区成员
发帖
与我相关
我的任务
分享
<input type="file" name="upload" onmouseout="if(this.value!='')alert(getPath(this))">
<script type="text/javascript">
function getPath(obj){
if(obj){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
obj.select();
return document.selection.createRange().text;
}
else if(window.navigator.userAgent.indexOf("Firefox")>=1){
if(obj.files){
return obj.files.item(0).getAsDataURL();
}
return obj.value;
}
return obj.value;
}
}
</script>