87,910
社区成员
发帖
与我相关
我的任务
分享
$('input[type=file]').change(function(){
$('#demo').html($(this).val()); //只能得到Breadcrumb_error.jpg 而我想得到全部路径 C:\.......
});
var f = document.getElementById("upload");
alert(f.value);
jquery不能获得了
//判断浏览器类型
var isIE = (document.all) ? true : false;
var isIE7 = isIE && (navigator.userAgent.indexOf('MSIE 7.0') != -1);
var isIE8 = isIE && (navigator.userAgent.indexOf('MSIE 8.0') != -1);
var file=document.getElementById("fileupload1");
if(isIE7 || isIE8)
{
file.select();
var path=document.selection.createRange().text;
document.selection.empty();
}