IE 브 라 우 저가 파일 을 업로드 할 때 로 컬 경로 가 "C: \ fakepath \" 로 변 하 는 문제
882 단어 Path
// 2
var isIE = (document.all) ? true : false; 3
var isIE7 = isIE && (navigator.userAgent.indexOf('MSIE 7.0') != -1);
var isIE8 = isIE && (navigator.userAgent.indexOf('MSIE 8.0') != -1);
var isIE6 = isIE && (navigator.userAgent.indexOf('MSIE 6.0') != -1);
var file = document.getElementById("uploadFile");
var path = null;
if (isIE7 || isIE8) {
file.select();//
path = document.selection.createRange().text;
document.selection.empty();
}
var filepath = document.getElementById("uploadFile").value;
if (isIE6) {
path = filepath;
}
alert("--------------------"+path);
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
cocos2d Lua 학습(一)ios에서 루아 함수 호출 및 전참 방법 lua 코드: 출력 결과: lua 호출 C++ 방법: add 함수: lua 코드: 출력 결과: 함수를 호출합니다. 함수를 호출하려면 다음 협의를 따르십시오. 우선, 호출할 함...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.