質問編集履歴

4

少々おかしかったので。

2018/12/25 17:08

投稿

syun625
syun625

スコア22

test CHANGED
File without changes
test CHANGED
@@ -182,7 +182,7 @@
182
182
 
183
183
 
184
184
 
185
-
185
+ ###include.js
186
186
 
187
187
  ```js
188
188
 

3

include.jsのソースコード書いてませんでした。

2018/12/25 17:08

投稿

syun625
syun625

スコア22

test CHANGED
File without changes
test CHANGED
@@ -182,6 +182,90 @@
182
182
 
183
183
 
184
184
 
185
+
186
+
187
+ ```js
188
+
189
+ function header(rootDir){
190
+
191
+ $.ajax({
192
+
193
+ url: rootDir + "include/header.html",
194
+
195
+ cache: false,
196
+
197
+ async: false,
198
+
199
+ dataType: 'html',
200
+
201
+ success: function(html){
202
+
203
+ html = html.replace(/\{$root\}/g, rootDir);
204
+
205
+ document.write(html);
206
+
207
+ }
208
+
209
+ });
210
+
211
+ }
212
+
213
+
214
+
215
+ function side(rootDir){
216
+
217
+ $.ajax({
218
+
219
+ url: rootDir + "include/side.html",
220
+
221
+ cache: false,
222
+
223
+ async: false,
224
+
225
+ dataType: 'html',
226
+
227
+ success: function(html){
228
+
229
+ html = html.replace(/\{$root\}/g, rootDir);
230
+
231
+ document.write(html);
232
+
233
+ }
234
+
235
+ });
236
+
237
+ }
238
+
239
+
240
+
241
+ function footer(rootDir){
242
+
243
+ $.ajax({
244
+
245
+ url: rootDir + "include/footer.html",
246
+
247
+ cache: false,
248
+
249
+ async: false,
250
+
251
+ dataType: 'html',
252
+
253
+ success: function(html){
254
+
255
+ html = html.replace(/\{$root\}/g, rootDir);
256
+
257
+ document.write(html);
258
+
259
+ }
260
+
261
+ });
262
+
263
+ }
264
+
265
+ ```
266
+
267
+
268
+
185
269
  ### 補足情報
186
270
 
187
271
 

2

ディレクトリ図が少しおかしかったので修正しました

2018/12/25 17:07

投稿

syun625
syun625

スコア22

test CHANGED
File without changes
test CHANGED
@@ -20,11 +20,11 @@
20
20
 
21
21
  └include
22
22
 
23
- ├header.html
23
+ . ├header.html
24
24
 
25
- ├side.html
25
+ . ├side.html
26
26
 
27
- └footer.html
27
+ . └footer.html
28
28
 
29
29
 
30
30
 

1

少し変更します。サイトの名前は伏せておきます。

2018/12/25 17:04

投稿

syun625
syun625

スコア22

test CHANGED
File without changes
test CHANGED
@@ -120,7 +120,7 @@
120
120
 
121
121
  <meta name="viewport" content="width=device-width, user-scalable=yes, maximum-scale=1.0, minimum-scale=1.0">
122
122
 
123
- <title>syun625の日記</title>
123
+ <title>*******</title>
124
124
 
125
125
  <link rel="icon" type="image/png" href="./images/favicon.png">
126
126