急急! 关于一段元搜索的ASP代码不懂!
Function Commend(ByVal WordList)Dim Rs
Dim WordItem
Dim I
DIm SQL
Dim Title
Dim Content
Dim URL
Dim HomePage
WordItem = Split(WordList,Chr(32))
For I = 0 To UBound(WordItem)
SQL = SQL & "Keyword Like '%" & WordItem(I) & ",%' Or "
Next
SQL = Left(SQL,(Len(SQL) - 3))
Set Rs = Conn.Execute("Select Top 10 * From Commend Where (" & SQL & ") And Timeout >= '" & FormatDateTime(Date,2) & "' Order By Price Desc")
If Rs.EOF Or Rs.BOF Then
Else
Set Title = Rs("Title")
Set Content = Rs("Content")
Set URL = Rs("URL")
Do While Not Rs.EOF
Commend = Commend & "<span style='font-size: 15px'><a href='http://" & URL & "' target='_blank'>" & Title & "</a></span><br>"
Commend = Commend & "<span style='line-height: 150%;font-size: 13px'>" & Content & "</span><br>"
If InStr(1,URL,"/",0) = 0 Then
HomePage = URL
Else
HomePage = Left(URL,InStr(1,URL,"/",0) - 1)
End If
Commend = Commend & "<span style='line-height: 150%'><font color='#008000'>" & HomePage & "</font></span><br><br>"
Rs.MoveNext
Loop
End If
Rs.Close
Set Rs = Nothing
End Function --------------------编程问答-------------------- 那个不懂做个标记啊.难道一大段都翻译成中文. --------------------编程问答-------------------- 这是 asp 不是 asp.net
都是很基本的语句,建议你找一本 asp 的书看下。前面是构造 sql,后面是拼接 html。
补充:.NET技术 , ASP.NET