質問編集履歴
3
17::08 解決
title
CHANGED
File without changes
|
body
CHANGED
@@ -40,4 +40,46 @@
|
|
40
40
|
<!-- 商品3 -->
|
41
41
|
<div class="AE_txt_head">販売価格:1,000円</div>
|
42
42
|
</body>
|
43
|
+
</html>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
====================================
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
【皆さんに教えてもらい解決したコード↓↓】
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
<!DOCTYPE html>
|
58
|
+
<html lang="ja">
|
59
|
+
<head>
|
60
|
+
<meta charset="UTF-8">
|
61
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
62
|
+
<title>testpage</title>
|
63
|
+
</head>
|
64
|
+
<body>
|
65
|
+
<style>
|
66
|
+
.free7{display: none;}
|
67
|
+
</style>
|
68
|
+
<script>
|
69
|
+
$(function(){
|
70
|
+
$("div:contains('OPENPRICE')").prev('.AE_txt_head')
|
71
|
+
.each(function(){
|
72
|
+
var txt= $(this).html();
|
73
|
+
$(this).html(txt.replace('販売価格:','オープンプライス:'));
|
74
|
+
});
|
75
|
+
});
|
76
|
+
</script>
|
77
|
+
<!-- 商品1 -->
|
78
|
+
<div class="AE_txt_head">参考販売価格:1,000円</div>
|
79
|
+
<!-- 商品2 -->
|
80
|
+
<div class="AE_txt_head">参考販売価格:1,000円</div>
|
81
|
+
<div class="free7">OPENPRICE</div>
|
82
|
+
<!-- 商品3 -->
|
83
|
+
<div class="AE_txt_head">参考販売価格:1,000円</div>
|
84
|
+
</body>
|
43
85
|
</html>
|
2
13:07 現在の状況
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,38 +11,33 @@
|
|
11
11
|
### 該当のソースコード
|
12
12
|
|
13
13
|
|
14
|
-
===============================
|
15
|
-
|
16
|
-
|
17
|
-
|
18
14
|
<!DOCTYPE html>
|
19
15
|
<html lang="ja">
|
20
|
-
<head>
|
16
|
+
<head>
|
21
|
-
<meta charset="UTF-8">
|
17
|
+
<meta charset="UTF-8">
|
22
|
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
18
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
23
|
-
<title>testpage</title>
|
19
|
+
<title>testpage</title>
|
24
|
-
</head>
|
20
|
+
</head>
|
25
|
-
<body>
|
21
|
+
<body>
|
22
|
+
<style>
|
23
|
+
.free7{display: none;}
|
24
|
+
</style>
|
25
|
+
<script>
|
26
|
+
$(function(){
|
27
|
+
$(".div:contains('OPENPRICE') .AE_txt_head")
|
28
|
+
.each(function(){
|
29
|
+
var txt= $(this).html();
|
30
|
+
$(this).html(txt.replace('販売価格:','オープンプライス:'));
|
31
|
+
});
|
32
|
+
});
|
33
|
+
</script>
|
26
34
|
|
27
|
-
<style>
|
28
|
-
.free7{display: none;}
|
29
|
-
<
|
35
|
+
<!-- 商品1 -->
|
30
|
-
|
31
|
-
<script>
|
32
|
-
$(function(){
|
33
|
-
$("div:contains('OPENPRICE') .AE_txt_head")
|
34
|
-
.each(function(){
|
35
|
-
var txt= $(this).html();
|
36
|
-
$(this).html(txt.replace('販売価格:','オープンプライス:'));
|
37
|
-
});
|
38
|
-
});
|
39
|
-
</script>
|
40
|
-
|
41
|
-
<div class="AE_txt_head">販売価格:</div>
|
36
|
+
<div class="AE_txt_head">販売価格:1,000円</div>
|
37
|
+
<!-- 商品2 -->
|
38
|
+
<div class="AE_txt_head">販売価格:1,000円</div>
|
42
|
-
<div class="free7">OPENPRICE</div>
|
39
|
+
<div class="free7">OPENPRICE</div>
|
43
|
-
|
40
|
+
<!-- 商品3 -->
|
41
|
+
<div class="AE_txt_head">販売価格:1,000円</div>
|
44
|
-
</body>
|
42
|
+
</body>
|
45
|
-
</html>
|
43
|
+
</html>
|
46
|
-
|
47
|
-
|
48
|
-
===============================
|
1
12:56 現在の状況です。
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,20 +6,43 @@
|
|
6
6
|
|
7
7
|
### 発生している問題・エラーメッセージ
|
8
8
|
|
9
|
-
if($("div:contains('OPENPRICE')"){ ←の箇所でUncaught SyntaxError: Unexpected token '{'と出ます。
|
10
9
|
|
10
|
+
|
11
11
|
### 該当のソースコード
|
12
12
|
|
13
|
-
<script>
|
14
|
-
|
15
|
-
$(function(){
|
16
|
-
if($("div:contains('OPENPRICE')"){
|
17
13
|
|
18
|
-
$('.AE_txt_head').each(function(){
|
19
|
-
|
14
|
+
===============================
|
20
|
-
$(this).html(txt.replace('販売価格:','オープンプライス:'));
|
21
|
-
});
|
22
|
-
}
|
23
|
-
});
|
24
15
|
|
16
|
+
|
17
|
+
|
18
|
+
<!DOCTYPE html>
|
19
|
+
<html lang="ja">
|
20
|
+
<head>
|
21
|
+
<meta charset="UTF-8">
|
22
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
23
|
+
<title>testpage</title>
|
24
|
+
</head>
|
25
|
+
<body>
|
26
|
+
|
27
|
+
<style>
|
28
|
+
.free7{display: none;}
|
29
|
+
</style>
|
30
|
+
|
31
|
+
<script>
|
32
|
+
$(function(){
|
33
|
+
$("div:contains('OPENPRICE') .AE_txt_head")
|
34
|
+
.each(function(){
|
35
|
+
var txt= $(this).html();
|
36
|
+
$(this).html(txt.replace('販売価格:','オープンプライス:'));
|
37
|
+
});
|
38
|
+
});
|
25
|
-
|
39
|
+
</script>
|
40
|
+
|
41
|
+
<div class="AE_txt_head">販売価格:</div>
|
42
|
+
<div class="free7">OPENPRICE</div>
|
43
|
+
|
44
|
+
</body>
|
45
|
+
</html>
|
46
|
+
|
47
|
+
|
48
|
+
===============================
|