0

我有一个正在转换为字符串并以 HTML 格式输出的元组。该字符串包含指向页面的链接(例如http://www.google.com),但该链接实际上并未超链接到 google.com,因为它只是将其视为文本。

谁能帮助我解决这个问题?这是我的代码:

commentString = ''
callComments = (interface.list_comments(db,10))
for comment in callComments:
    commentString += str(comment) + '<br> <br>'

content = {'comments': '<p>%s</p>' % commentString,
           }

HTML 端:

<div class = "comments">
<p>These are some comments:</p>
 %comments
</div>
4

1 回答 1

0

在 HTML 中,超链接是由标签创建的。http://www.w3schools.com/tags/tag_a.asp

于 2013-04-29T09:01:04.947 回答