JS读取本地文本文件(不用fso)

<SCRIPT> 
//<!-- 
function onDownloadDone(s) { 
        oText.value=s; 
} 
//--> 
</SCRIPT> 
<BODY> 
<IE:DOWNLOAD ID="oDownload" STYLE="behavior:url(#default#download)" /> 
<input type="file" id="src"> 
<A HREF="#" onclick="if(src.value!='')oDownload.startDownload(src.value, onDownloadDone)">读取TXT</A> 
<BR><BR> 
<TEXTAREA ID=oText COLS=70 ROWS=10> 
</TEXTAREA> 

 

你可能感兴趣的:(IE)