如何在经典asp中使用<a href> </a>?

use*_*760 -1 asp-classic

我有三列column(0),column(1),column(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
Run Code Online (Sandbox Code Playgroud)

Jer*_*emy 5

您已经在使用Response.Write字符串了.

你只需:

Response.Write "<a href=""" & link & """>" & linkName & "</a>"