A simple tool to store and display texts longer than a few lines.
The search button<div id="xyz">will highlight all</div> 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.
我想檢索由div-xyz標記包圍的字符。 example output.
....搜索按鈕將突出顯示所有的話.....包圍特定標記的特定字符的連接
我能夠通過以下來獲得當前div標籤的文本。
function myDivHTML(valueName){
if((obj = document.getElementById(valueName)) && obj != null){
return obj.innerHTML;
}
}
我試圖與元素的性質offsetParent
- 但也有很多可能性,例如div標籤可能就可以大膽標籤&大膽的標籤裏面可以是對標籤&內等。
我該怎麼做才能得到周圍的文字?限制可能是10,20個字符。
編輯:
周圍的文本指 - >文本左側10或20個字符和右側10或20個字符。
定義 「周圍的文本」。 – Tomalak 2010-07-21 10:02:25
@Tomalak - 請檢查示例和編輯問題。 – 2010-07-21 10:04:26