質問編集履歴
1
PHPで生成されるHTML部分です
title
CHANGED
File without changes
|
body
CHANGED
@@ -44,4 +44,98 @@
|
|
44
44
|
```
|
45
45
|
テストとして同階層にhtmlファイルを作成し簡単なテーブルを作ったときはうまくいきました。
|
46
46
|
うまく行かないのにはどういうことが考えられるのでしょうか?
|
47
|
-
アドバイスお願いします
|
47
|
+
アドバイスお願いします
|
48
|
+
|
49
|
+
追記
|
50
|
+
生成されたHTMLです
|
51
|
+
カラム数を減らしてみましたがうまくいきませんでした
|
52
|
+
```php
|
53
|
+
<!DOCTYPE html>
|
54
|
+
<html lang="ja">
|
55
|
+
<head>
|
56
|
+
<meta charset="UTF-8">
|
57
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
58
|
+
<link rel="stylesheet" href="../vendor/twbs/bootstrap/dist/css/bootstrap.css">
|
59
|
+
|
60
|
+
<!-- テーブルソート -->
|
61
|
+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css">
|
62
|
+
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
63
|
+
<script src="jquery.tablesorter.min.js"></script>
|
64
|
+
<link rel="stylesheet" href="theme.default.min.css">
|
65
|
+
|
66
|
+
<title>DMMのセール情報を検索!</title>
|
67
|
+
</head>
|
68
|
+
|
69
|
+
<body>
|
70
|
+
<nav class="navbar navbar-light bg-light p-3 d-flex justify-content-between"
|
71
|
+
style="position: -webkit-sticky; position: sticky; top: 0;">
|
72
|
+
<a class="navbar-brand" href="/searching/public/index.php" style="font-size: 2rem">DMM search</a>
|
73
|
+
|
74
|
+
<!-- <form action="/result.html" class="text-center" method="post">-->
|
75
|
+
<form action="/searching/public/result.php" class="text-center" method="post">
|
76
|
+
<div class="form-group my-2">
|
77
|
+
<input type="text" name="search" class="mt-3" placeholder="テキスト">
|
78
|
+
<input type="submit" class="btn btn-outline-success btn-sm" value="検索">
|
79
|
+
</div>
|
80
|
+
</form>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
<!-- レス、マッチするものがない時 -->
|
84
|
+
<div class="announcement container text-center">
|
85
|
+
<p style="font-size: 0.8;">※「作品名」をクリックすると、DMMの商品ページに<span style="color: #ff4500;">移動</span>します</p>
|
86
|
+
<p style="font-size: 0.8;">※「出演者」をクリックすると、出演者名で再検索を行います</p>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div class="result_good container">
|
90
|
+
<table class="table table-striped tablesorter" id="result-table">
|
91
|
+
<thead>
|
92
|
+
<tr>
|
93
|
+
<th class="title_head table_head" style="width: 55%">作品名</th>
|
94
|
+
<th class="performer_head table_head" style="width: 20%">出演者</th>
|
95
|
+
<th class="price_head table_head" style="width: 10%">価格</th>
|
96
|
+
<th class="price_head table_head" style="width: 15%;">ジャケット</th>
|
97
|
+
</tr>
|
98
|
+
</thead>
|
99
|
+
<tbody>
|
100
|
+
|
101
|
+
<!-- 「レス」の連想配列に対しループを回す -->
|
102
|
+
<tr class="item">
|
103
|
+
<td class="title table_row">
|
104
|
+
<!-- noopener 未対応ブラウザ用に noreferrer も指定 -->
|
105
|
+
<a href="https://www.dmm.com" target="_blank" rel="noopener noreferrer"><font color="#07519a">title</font></a>
|
106
|
+
</td>
|
107
|
+
<td class="performer table_row">
|
108
|
+
<!-- 出演者が判明している時 -->
|
109
|
+
|
110
|
+
<a href=/searching/public/result.php?name=performer><font color="#07519a">performer</font></a>
|
111
|
+
<!-- 出演者が不明の時 -->
|
112
|
+
</td>
|
113
|
+
<td class="price table_row">200 円〜</td>
|
114
|
+
<td><img src="https://pics.dmm.com/abc.jpg" style='margin: 3px 5px; padding: 1px 3px;'></td>
|
115
|
+
</tbody>
|
116
|
+
</table>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<!-- location.href='/' は aタグ以外での画面遷移 -->
|
120
|
+
<div class="return_home container">
|
121
|
+
<button type=“button” class="btn btn-outline-primary btn-lg mx-auto d-block"
|
122
|
+
onclick="location.href='/searching/public/index.php'">ホームに戻る</button>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
|
126
|
+
<script type="text/javascript">
|
127
|
+
$(function(){
|
128
|
+
$('#result-table').tablesorter({
|
129
|
+
headers: {
|
130
|
+
0: { sorter: false}, /// => タイトル
|
131
|
+
1: { sorter: false}, /// => 出演者
|
132
|
+
2: { sorter: "digit"}, /// => 価格でソート
|
133
|
+
3: { sorter: false} /// => 画像
|
134
|
+
}
|
135
|
+
});
|
136
|
+
});
|
137
|
+
</script>
|
138
|
+
|
139
|
+
</body>
|
140
|
+
</html>
|
141
|
+
```
|