【发布时间】:2012-11-26 19:25:08
【问题描述】:
我有一个 XML 文件,它在 XML 子标签中包含一些 Anchor(A HREFs) 标签......当我使用 JQuery 加载内容并生成动态 HTML 元素时,链接不会出现。
示例 XML 标记:
<question>
<number>12</number>
<qts>How can I download the mobile app?</qts>
<ans>Please login to the site – <a href="https://google.com">https://google.com</a> from your desktop/laptop. Go to the subscribe page and download the file that is appropriate for you.</ans>
</question>
JQuery 标签加载:
xml_ans = $(this).find('ans').text();
问题是https://google.com 没有显示为链接。
任何人都可以给它一些启示或提示吗?
【问题讨论】:
-
内容现在显示为链接...我忘记了这个概念...当您添加数据时,内容将作为 HTML 处理,否则如果您不添加 CDATA 标记,则内容将被处理为纯文本...
标签: jquery html xml hyperlink anchor