html - 如何突出显示基于 html 的时事通讯中的特定单词?
问题描述
我想问您以下问题:我有一个基于 html 的时事通讯,该时事通讯链接到自动添加的文章。这些文章显示为:
Title:
Article 1 pub date
description
Article 2 pub date
description and so on
我想在文章描述或标题中突出显示某些词。例如“测试”。(或者换句话说,添加一个规则,以确保每次文章都加载到时事通讯中,并且如果该特定单词出现在其中一篇文章中,它会被突出显示。我希望你能帮助我一些关于我在哪里的提示应该将某些代码放在下面的部分或其他地方(html代码有 and 和 )。
谢谢一堆。
确保文章加载的部分如下:
<!-- This part generates the articles -->
<xsl:template match="story" mode="article">
<xsl:if test="related">
<tr>
<td><a><xsl:attribute name="name"><xsl:value-of select="storyid"/></xsl:attribute></a></td>
</tr>
<tr>
<td style="font-size: 9pt; text-decoration: none;"><a><xsl:attribute name="href"><xsl:value-of select="weburl"/></xsl:attribute><xsl:value-of select="titel"/></a> - <xsl:value-of select="source_lang"/>
<xsl:if test="type='WEBARTICLE' and weburl!=''"> online</xsl:if></td>
</tr>
<xsl:if test="snippet!=''">
<tr>
<td style="line-height: 5px;"><xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text></td>
</tr>
<tr><td style="font-size: 9pt; text-decoration: none;">
...<xsl:apply-templates select="snippet"/>...</td>
</tr>
</xsl:if>
解决方案
推荐阅读
- java - 连接 USB 时,保存在 Android 内部存储中的文件在 PC 上不显示
- ssl - 启用 raft 模式时 TLS 握手失败
- angular - 从构建项目Angular的文件中读取参数
- android - 编辑文本掩码字符和数字android studio
- command-line - 如何忽略 7-zip 命令行警告并继续?
- docker - docker 容器会即时获取代码更改吗?
- java - Android Studio 不断导入 import sun.jvm.hotspot.utilities.IntArray
- rust - 将向量中的每个元素与下一个元素进行比较
- c# - .net core 3.0 无法加载文件或程序集'System.Web.Http Version=5.2.7.0'
- python - 将需要修改的函数放在装饰器的什么位置