質問編集履歴
2
ソースコードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
A.htmlの中にB.
|
1
|
+
A.htmlの中にB.htmlのコードを読み込ませて表示させる。
|
2
2
|
|
3
3
|
というような操作がしたいのですが、
|
4
4
|
|
5
|
-
A.htmlでB.
|
5
|
+
A.htmlでB.htmlで使用するcssとjsを読み込んでいるのがだめなのか
|
6
6
|
|
7
7
|
A.htmlを開くと一瞬表示されてそのあと全ページがB.htmlになってしまいます。
|
8
8
|
|
@@ -20,13 +20,13 @@
|
|
20
20
|
|
21
21
|
/view
|
22
22
|
|
23
|
-
|--- A.html (css/A&B.css js/A&B.js include/B.
|
23
|
+
|--- A.html (css/A&B.css js/A&B.js include/B.html)
|
24
24
|
|
25
25
|
|
|
26
26
|
|
27
27
|
|--- /include
|
28
28
|
|
29
|
-
| └--- B.
|
29
|
+
| └--- B.html
|
30
30
|
|
31
31
|
|
|
32
32
|
|
@@ -44,13 +44,17 @@
|
|
44
44
|
|
45
45
|
includeはjqueryを使用して処理しています。
|
46
46
|
|
47
|
+
|
48
|
+
|
49
|
+
【A.html】
|
50
|
+
|
47
51
|
```javascript
|
48
52
|
|
49
53
|
<script type="text/javascript">
|
50
54
|
|
51
55
|
$(function() {
|
52
56
|
|
53
|
-
$(".search").load("include/B.
|
57
|
+
$(".search").load("include/B.html");
|
54
58
|
|
55
59
|
});
|
56
60
|
|
@@ -68,4 +72,92 @@
|
|
68
72
|
|
69
73
|
|
70
74
|
|
75
|
+
【B.html】
|
76
|
+
|
77
|
+
```html
|
78
|
+
|
79
|
+
<div class="y-scroll">
|
80
|
+
|
81
|
+
<div class="y-hidden">
|
82
|
+
|
83
|
+
<table class="y-data">
|
84
|
+
|
85
|
+
<colgroup>
|
86
|
+
|
87
|
+
<col style='width:10%;'>
|
88
|
+
|
89
|
+
<col style='width:25%;'>
|
90
|
+
|
91
|
+
<col style='width:25%;'>
|
92
|
+
|
93
|
+
<col style='width:25%;'>
|
94
|
+
|
95
|
+
<col style='width:16px;'>
|
96
|
+
|
97
|
+
</colgroup>
|
98
|
+
|
99
|
+
<script type="text/javascript">
|
100
|
+
|
101
|
+
var text = timeTable();
|
102
|
+
|
103
|
+
for (var i = 0; i < text.length; i++) {
|
104
|
+
|
105
|
+
document.write(text[i]);
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
</script>
|
110
|
+
|
111
|
+
</table>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
```
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
【B.js】
|
122
|
+
|
123
|
+
```javascript
|
124
|
+
|
125
|
+
function timeTable() {
|
126
|
+
|
127
|
+
var tagF = "<tr><th>";
|
128
|
+
|
129
|
+
var tagE = "</th><td></td><td></td><td></td><td></td></tr>";
|
130
|
+
|
131
|
+
var text = []; //htmlに表示させるタグ(完成系)
|
132
|
+
|
133
|
+
var minute = [':00', ':30'];
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
var count = 0;
|
138
|
+
|
139
|
+
for (var hour = 0; hour <= 24;) {
|
140
|
+
|
141
|
+
text.push(tagF + hour + minute[count] + tagE);
|
142
|
+
|
143
|
+
count++;
|
144
|
+
|
145
|
+
if (count == 2) {
|
146
|
+
|
147
|
+
count = 0;
|
148
|
+
|
149
|
+
hour++;
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
return text;
|
156
|
+
|
157
|
+
}
|
158
|
+
|
159
|
+
```
|
160
|
+
|
161
|
+
|
162
|
+
|
71
163
|
至らない点もございますがよろしければご教授ください。
|
1
includeのコード記述と ファイル名修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
A.htmlの中にB.h
|
1
|
+
A.htmlの中にB.phpのコードを読み込ませて表示させる。
|
2
2
|
|
3
3
|
というような操作がしたいのですが、
|
4
4
|
|
5
|
-
A.htmlでB.h
|
5
|
+
A.htmlでB.phpで使用するcssとjsを読み込んでいるのがだめなのか
|
6
6
|
|
7
7
|
A.htmlを開くと一瞬表示されてそのあと全ページがB.htmlになってしまいます。
|
8
8
|
|
@@ -20,13 +20,13 @@
|
|
20
20
|
|
21
21
|
/view
|
22
22
|
|
23
|
-
|--- A.html (css/A&B.css js/A&B.js include/B.h
|
23
|
+
|--- A.html (css/A&B.css js/A&B.js include/B.php)
|
24
24
|
|
25
25
|
|
|
26
26
|
|
27
27
|
|--- /include
|
28
28
|
|
29
|
-
| └--- B.h
|
29
|
+
| └--- B.php
|
30
30
|
|
31
31
|
|
|
32
32
|
|
@@ -42,4 +42,30 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
+
includeはjqueryを使用して処理しています。
|
46
|
+
|
47
|
+
```javascript
|
48
|
+
|
49
|
+
<script type="text/javascript">
|
50
|
+
|
51
|
+
$(function() {
|
52
|
+
|
53
|
+
$(".search").load("include/B.php");
|
54
|
+
|
55
|
+
});
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
</script>
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
```html
|
64
|
+
|
65
|
+
<div class="search"></div>
|
66
|
+
|
67
|
+
```
|
68
|
+
|
69
|
+
|
70
|
+
|
45
71
|
至らない点もございますがよろしければご教授ください。
|