【发布时间】:2011-03-25 04:59:03
【问题描述】:
示例 HTML 数据
<body style="width:300px;">
<h3>Long-Text</h3>
A simple tool to store and display texts longer than a few lines.
The search button will highlight all the words matching the name of objects that are members of the classes listed in searchedClasses, itself a member of the KeySet class. The highlighted words are hypertext.
Edit invokes wscripts/acedb.editor, which by default launches emacs. Edit that file to start another editor in its place.
Save will recover from the emacs but will not destroy it.
Read will read a text file, so you could Search it.
**general** grep is a way to annotate a set of longtexts versus the searchedClasses. It outputs an ace file that you can then hand check and read back in acedb to create XREF from longTexts to genes etc.
<h3>World Wide NotePad</h3>
World wide notepad is a small text editor similar to Microsoft's notepad but has some more useful features like an auto typer to make typing the same sentence or word more easy, also World Wide NotePad has a text to speech feature which reads all text in the current open document and speaks it out load to you.
<h3>Etelka Wide Text Pro Bold Italic</h3>
</body>
例如 -> “general”(在 ** 之间)位于 x=0 和 y=465。我知道 x,y 位置。但是如何突出显示位于特定位置的单词?
让我再解释一次。我想按位置突出显示一个单词。
例如,我有一个位置值 (x,y)=(0,625)。我想提取该位置的第一个单词(假设-在该位置-我们有单词“World”)那么如何突出显示该单词?
编辑:
这里Y坐标是整个html文档的绝对位置。
【问题讨论】:
-
高亮显示,你的意思是选择它或者你想把它包裹在例如
span标签? -
我想用
span标签包裹——例如<span id='sfasfsdfsf'>World</span> -
我应该读过标题 ;)
-
也许你可以尝试动态生成一个正则表达式来选择/匹配单词“world”(使用前面和后面的单词)并使用replace应用额外的span标签。
标签: javascript dom html dhtml