我使用JavaScript獲取div的html值。它返回像如何使用JavaScript在特定單詞之前切分文本
From looking down the Line, he turned himself about again, and, raising his eyes, saw my figure high above him.Without prolonging the narrative to dwell on any one of its curious circumstances more than on any other, I may, in closing it, point out the coincidence that the warning of the Engine-Driver included, not only the words which the unfortunate Signal-man had repeated to me as haunting him, but also the words which I myself—not he—had attached, and that only in my own mind, to the gesticulation he had imitated.
我需要之前和特定text.unfortunate後切片值是特定的詞的價值。例如,我需要得到像下面
....引擎驅動程序包括,不僅不幸的話信號人重複了我,作爲困擾他,但也是我自己的話。 ...
你爲什麼要做那 –
@ArunPJohny我正在搜索div中的單詞。 ir返回全部內容。我需要在該單詞的前後切片 – Jegadeesan
我的問題是切片後想要做什麼...你想突出顯示它 –