用javascript實現(xiàn)讀取txt文檔的腳本
更新時間:2007年07月20日 00:00:00 作者:
duqu.htm
<html><body>
<span id=showImport1></span>
<IE:Download ID="oDownload1" STYLE="behavior:url(#default#download)" />
<script>
function onDownloadDone(downData){
document.getElementById('showImport1').innerHTML=downData;
}
oDownload1.startDownload('qgwl.txt',onDownloadDone)
</script>
</body>
</html>
qgwl.txt
這里是文本內(nèi)容
復制代碼 代碼如下:
<html><body>
<span id=showImport1></span>
<IE:Download ID="oDownload1" STYLE="behavior:url(#default#download)" />
<script>
function onDownloadDone(downData){
document.getElementById('showImport1').innerHTML=downData;
}
oDownload1.startDownload('qgwl.txt',onDownloadDone)
</script>
</body>
</html>
qgwl.txt
復制代碼 代碼如下:
這里是文本內(nèi)容
相關(guān)文章
javascript將非數(shù)值轉(zhuǎn)換為數(shù)值
parseInt()不能轉(zhuǎn)換浮點型數(shù)值,我們用parseFloat()來解決。這篇文章主要介紹了javascript將非數(shù)值轉(zhuǎn)換為數(shù)值,需要的朋友可以參考下2018-09-09JavaScript中檢測數(shù)據(jù)類型的四種方法
這篇文章主要給大家分享的是JavaScript中檢測數(shù)據(jù)類型的四種方法,有 typeof、instanceof、constructor、Object.prototype.toString.call(),下面文章詳細介紹內(nèi)容,需要的小伙伴可以參考一下2022-01-01JS禁用頁面上所有控件的實現(xiàn)方法(附demo源碼下載)
這篇文章主要介紹了JS禁用頁面上所有控件的方法,涉及JavaScript捕捉頁面元素的相關(guān)技巧,并附帶demo源碼供讀者下載參考,需要的朋友可以參考下2015-12-12