質問編集履歴
2
説明修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
ページ内で特定の文字列を検索して、テーブル内のレコード抽出しています。
|
2
|
+
(抽出はできています)
|
2
|
-
|
3
|
+
この後、抽出されたレコード内の特定の文字列(検索した文字列)の色を変える、という仕組みを作りたいのですが、うまくいきません。
|
4
|
+
|
3
5
|
CSSのハイライトをどのように記述すればいいのでしょうか。
|
4
6
|
|
5
7
|
以下のような仕組みです。
|
1
htmlのhead部分追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -39,6 +39,7 @@
|
|
39
39
|
$('#result tr').show();
|
40
40
|
});
|
41
41
|
});
|
42
|
+
|
42
43
|
```
|
43
44
|
```CSS
|
44
45
|
.highlight {
|
@@ -47,6 +48,16 @@
|
|
47
48
|
```
|
48
49
|
|
49
50
|
```html
|
51
|
+
<head>
|
52
|
+
<script type="text/javascript" src="jquery.js"></script>
|
53
|
+
<script type="text/javascript" src="jquery-highlight-5s.js"></script>
|
54
|
+
</head>
|
55
|
+
<body>
|
56
|
+
|
50
57
|
<p> <input type="text" id="search" value=" "> <input type="button" value="and検索" id="button2" id="btn-onoff"> <input type="button" value="すべて表示" id="button3"> </p>
|
51
58
|
<table id="result">
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
</body>
|
52
63
|
```
|