我有三列第(0)列,第(1)列,第(2)列,我希望在以下代码中为这三行提供标记:“strNewContents = strNewContents&”“& columns(0) &“”& columns(1)&“”& columns(2)&“”& vbcrlf:“
实际代码:
Dim strFileName1
Dim objFSO, objTextFile
Dim intLineNumber, strNewContents, strReadLineText,strLineNumbers
dim data, columns
strFileName1 = "saveimagename.txt"
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(Server.MapPath(strFileName1))
intLineNumber = 0
strLineNumbers = ""
data = split(objTextFile.readall(), vbcrlf)
for intLineNumber = 0 to ubound(data)
columns = split(data(intLineNumber), ",", 3)
if (ubound(columns) = 2) then
''//strNewContents = "<td class='red'>" & columns(0) & "</td><td class='blue'>" & columns(2) & "</td>"
strNewContents = strNewContents & "<tr><td>" & columns(0) & "</td><td>" & columns(1) & "</td><td>" & columns(2) & "</td></tr>" & vbcrlf
end if
next
答案 0 :(得分:5)
您已使用Response.Write
字符串。
你只是:
Response.Write "<a href=""" & link & """>" & linkName & "</a>"