<%
txtpath="/txt/readme.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(server.mappath(txtpath), 1)
txt=ts.ReadAll
Set ts=nothing
Set fso=nothing
txt=Server.HTMLEncode(txt)
txt=Replace(txt,chr(13),"<br>")
%>
<textarea><%=txt%></textarea>
txtpath="/txt/readme.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(server.mappath(txtpath), 1)
txt=ts.ReadAll
Set ts=nothing
Set fso=nothing
txt=Server.HTMLEncode(txt)
txt=Replace(txt,chr(13),"<br>")
%>
<textarea><%=txt%></textarea>
解决方案 »
- var c=$(this),ul=$("ul",c),这个变量ul是什么?
- 亏求帮忙 请大家帮助
- 请教,如何用JS获取上一个网页的网址 ????
- web程序的逻辑用javascript实现是否合适?
- 急!js如何实现以UltraEdit打开指定文件,并将光标移动到指定行指定列或者将指定内容选中!!!
- 哪位大哥能帮忙具体解释一下/^\d{15}(\d{2}[0-9a-zA-Z])?$/ 这个的意思?
- 关于JS输出 [不可思议]
- 百度用户注册页面的两种技术
- setTimeout与document.write的困惑
- 请问那里有阴阳历转换的js源码吗?
- <a onclick='Javascript:doit(" aaa 'bbb " );' >s</a> 改如何正确显示,aaa'bbb 里的' 该如何处理?
- 有没有知道“开始”-“程序”中的“程序”的注册表键值是在哪里?
<input type="file" name="file1" onpropertychange="showTextFile(this.form, this.value)"><br>
<textarea name="txt1" rows="3" cols="40"></textarea><br>
<input type="submit">
</form>
<script language="javascript">
var fso;
var ForReading = 1;
function showTextFile(objForm, sFileName)
{
if (!fso)
fso = new ActiveXObject("Scripting.FileSystemObject"); var ts = fso.OpenTextFile(sFileName,ForReading);
objForm.txt1.value = ts.ReadAll();
ts.Close();
ts = null;
}
</script>