本地文件用fso
外地文件用xmlhttp
如果都不想用
你也可以用一个隐藏的iframe中,将内容不停读到iframe包含的页面中,
刷的时候刷那个iframe
外地文件用xmlhttp
如果都不想用
你也可以用一个隐藏的iframe中,将内容不停读到iframe包含的页面中,
刷的时候刷那个iframe
解决方案 »
- 怎样让某个函数执行其中一个 或者全部执行
- 有知道的请回答,高分悬赏!!!!!!!!!!只给回答最好的了!!!
- 小问题
- 如何实现整词选中?
- 什么是JS木马?能造成什么严重后果?
- 帮忙写两个正则表达式,谢谢
- 菜鸟问题:简单的javascript中有错误缺少“)”.我检查不出来
- 用Select 选择一个值时,怎样显示该值对应的内容
- 没有人知道吗,alert,confirm的参数都不可改吗,没有请告之
- 隐藏左侧菜单栏时,右侧框架里的网页在谷歌浏览器里会向下移动一个屏幕的距离
- 有没有这样的菜单:点击一个父菜单展开相应的子菜单,同时关闭其他已展开的菜单,也就是每次只展开一个父菜单及其子菜单,万分感谢,当然只能
- window.open时如何使窗口从屏幕的右下角打开!
<html>
<head>
<title> 读取服务端文本文件程序 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="EditPlus">
<meta name="Author" content="fason,阿信">
<meta name="Keywords" content="fason,阿信">
<meta name="Description" content="">
<style type="text/css">
<!--
body,div { font:9pt Arial;padding:5px;}
-->
</style>
<script language="JavaScript">
<!--
//** power by fason
var src = 'test.txt';
function getFile(){
oDownload.startDownload(src,onDownloadDone);
}
function onDownloadDone(s) {
s = s.replace(/&/g,'&').replace(/\"/g,'"').replace(/</g,'<').replace(/>/g,'>').replace(/\x0d\x0a/g,'<br>');
demo.innerHTML = s;
setTimeout(getFile,1000);//1秒钟读一次
}//-->
</script>
</head><body onload="getFile()">
<IE:Download ID="oDownload" STYLE="behavior:url(#default#download)" />
<div id="demo"></div>
</body>
</html>
<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>
<BODY BGCOLOR="white">
<SPAN CLASS=time STYLE="COLOR:Red;" BEGIN="0" END="10"
TIMEACTION="visibility">
<H3>Paragraph 1</H3>
<P>This is paragraph number one. It is displayed as soon as
the page is loaded.</P>
</SPAN>
<SPAN CLASS=time STYLE="COLOR:Blue;" BEGIN="3" END="20"
TIMEACTION="visibility">
<H3>Paragraph 2</H3>
<P>This is paragraph number two. It is displayed three seconds
after the page is loaded.</P>
</SPAN>
<SPAN CLASS=time STYLE="COLOR:Green;" BEGIN="6" END="10"
TIMEACTION="visibility">
<H3>Paragraph 3</H3>
<P>This is paragraph number three. It is displayed six seconds
after the page is loaded.</P>
</SPAN>
</BODY>
</HTML>
var i=0;
function aa(){
if(i<100){
ShowPlan.innerHTML = ShowPlan.innerHTML+ "<br>" + (i+1);
i++
}
}
setInterval("aa()",1000)
</script>
<body onClick="aa()">
<div id="ShowPlan" style="background-color: #abcdef; font-size: 12px; color: red; width: 600px; border: 1px solid #0099CC;"></div><br>
</body>
<pre>
白日依山尽,
黄河入海流,
欲穷千里目,
更上一层楼。
</pre>
</marquee >
白日依山尽,
黄河入海流,
欲穷千里目,
更上一层楼。
</TEXTAREA>
<INPUT type="button" value="Button"
onclick='ppp.innerText=ttt.value;'>
<marquee direction=up>
<pre id=ppp>
</pre>
</marquee >
var src = 'test.txt';
function getFile(){
oDownload.startDownload(src,onDownloadDone);
}
function onDownloadDone(s) {
s = s.replace(/&/g,'&').replace(/\"/g,'"').replace(/</g,'<').replace(/>/g,'>').split("\r\n");
if(n>s.length-1) n = 0;
demo.innerHTML = s[n++];
setTimeout(getFile,1000);
}
有好多显示方法^
有的是打字机效果等等^