asp读取txt并设置文字颜色
<styletype="text/css">body{background:url(i.png);}<inputtype="text"value="123456"name...
<style type="text/css">
body {background:url(i.png);}
<input type="text" value="123456" name="name" style="color:#ff0000;">
</style>
<%
function HTMLEncode(fString)
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode = fString
end function
set fs=server.createobject("scripting.filesystemobject")
file=server.mappath("txt1.txt")
set txt=fs.opentextfile(file,1,true)
line=HTMLEncode(txt.ReadAll)
response.Write line
%>
怎么让读出来的文字显示为红色, 展开
body {background:url(i.png);}
<input type="text" value="123456" name="name" style="color:#ff0000;">
</style>
<%
function HTMLEncode(fString)
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode = fString
end function
set fs=server.createobject("scripting.filesystemobject")
file=server.mappath("txt1.txt")
set txt=fs.opentextfile(file,1,true)
line=HTMLEncode(txt.ReadAll)
response.Write line
%>
怎么让读出来的文字显示为红色, 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询