質問編集履歴
3
コード
test
CHANGED
File without changes
|
test
CHANGED
@@ -59,3 +59,15 @@
|
|
59
59
|
|
60
60
|
|
61
61
|
尚、$(this)の要素は1列目(一つ目のTDに収まった2つ目のINPUT要素 name=cd[]を指している想定での質問です)
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
```JS
|
66
|
+
|
67
|
+
$("input[name='cd[]']").on("change",function() {
|
68
|
+
|
69
|
+
$(this).parent().parent().find(".errmark").html("*");
|
70
|
+
|
71
|
+
});
|
72
|
+
|
73
|
+
```
|
2
コメント追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -58,4 +58,4 @@
|
|
58
58
|
|
59
59
|
|
60
60
|
|
61
|
-
尚、$(this)の要素は1列目(一つ目のTDに収まったINPUT要素を指している想定での質問です)
|
61
|
+
尚、$(this)の要素は1列目(一つ目のTDに収まった2つ目のINPUT要素 name=cd[]を指している想定での質問です)
|
1
コード
test
CHANGED
File without changes
|
test
CHANGED
@@ -19,3 +19,43 @@
|
|
19
19
|
初歩的なことと思いますが、.html("")を効かすための手立てをご教授頂けませんでしょうか
|
20
20
|
|
21
21
|
findと併用できない??とか でしょうか
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
```HTML
|
26
|
+
|
27
|
+
<tr >
|
28
|
+
|
29
|
+
<td style="width: 9%;"><input type="hidden" name="rsvno"><button class="cdsrch" type="button"><img src="img/検索.png"></button><input type="text" name="cd[]" style="width: 64%; ime-mode: inactive;" /></td>
|
30
|
+
|
31
|
+
<td style="width: 31%;"><input type="text" name="name[]" style="width: 100%;" readonly /></td>
|
32
|
+
|
33
|
+
<td style="width: 15%;"><input type="text" name="capa[]" style="width: 100%;" readonly /></td>
|
34
|
+
|
35
|
+
<td style="width: 12%;"><button class="lotsrch" type="button"><img src="img/検索.png"></button><input type="text" name="lot[]" style="width: 75%; ime-mode: inactive;" /></td>
|
36
|
+
|
37
|
+
<td style="width: 7%;"><input type="text" name="reqrsv[]" style="width: 92%; ime-mode: inactive;" /></td>
|
38
|
+
|
39
|
+
<td style="width: 8%;"><input type="text" name="custockl[]" style="width: 95%;" readonly /></td>
|
40
|
+
|
41
|
+
<td style="width: 10%;"><input type="text" name="custocka[]" style="width: 95%;" readonly /></td>
|
42
|
+
|
43
|
+
<td style="width: 2%;"><span class="errmark" style="width: 100%;"></span></td>
|
44
|
+
|
45
|
+
<td style="width: 3%;"><button class="rowins" type="button" style="width: 100%;">+</button></td>
|
46
|
+
|
47
|
+
<td style="width: 3%;"><button class="rowdel" type="button" style="width: 100%;">-</button></td>
|
48
|
+
|
49
|
+
</tr>
|
50
|
+
|
51
|
+
```
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
ちなみにconsole.log($(this).parent().parent().find(".errmark"));の結果は
|
56
|
+
|
57
|
+
undefinedでした。この状況ではhtml()の指示も無理でしょうね。
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
尚、$(this)の要素は1列目(一つ目のTDに収まったINPUT要素を指している想定での質問です)
|