<script language="vbscript">
Function getActivity(ID)
Option explicit
Response.Buffer = true
dim conn, sql, rs,rs1,Action, UserID, strHolder,
Set conn = Server.CreateObject("ADODB.Connection")
conn.open Application("Database4_ConnectionString")
sql = ""
sql = "Select DateShown, Title, TextBody from Activity where ActID = "& ID
set rs = Conn.Execute(sql)
strHolder = rs("TextBody")
If InStr(strHolder, "</font>") > 0 or InStr(strHolder, "</p>") > 0 or InStr(strHolder, "<br>") > 0 Then
TextBody = strHolder
Else
TextBody = Replace("" & strHolder, chr(13) & chr(10), "<br>")
End if
End Function
</script>
我尝试在 html 中使用这个 vbscript 函数如下,但它没有显示预期的输出。我想使用文本正文中的内容
<div class="modal-body">
<h4>Text in a modal</h4>
<p>You can add some text here too.</p>
<p><script type="vbscript">getActivity(216)</script></p>
</div>
请告诉我哪里出错了。