用javascript实现读取txt文档的脚本
作者:
用javascript实现读取txt文档的脚本
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
这里是文本内容
复制代码 代码如下:
<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
复制代码 代码如下:
这里是文本内容