質問編集履歴

3

訂正

2018/06/05 05:40

投稿

ysfree14
ysfree14

スコア19

test CHANGED
File without changes
test CHANGED
@@ -14,24 +14,24 @@
14
14
 
15
15
  $(window).on("load",function(){
16
16
 
17
- $('iframe.autoHeight').each(function(){
17
+     $('iframe.autoHeight').each(function(){
18
18
 
19
- var D = $(this).get(0).contentWindow.document;
19
+         var D = $(this).get(0).contentWindow.document;
20
20
 
21
- var innerHeight = Math.max(
21
+         var innerHeight = Math.max(
22
22
 
23
- D.body.scrollHeight, D.documentElement.scrollHeight,
23
+         D.body.scrollHeight, D.documentElement.scrollHeight,
24
24
 
25
- D.body.offsetHeight, D.documentElement.offsetHeight,
25
+         D.body.offsetHeight, D.documentElement.offsetHeight,
26
26
 
27
- D.body.clientHeight, D.documentElement.clientHeight
27
+         D.body.clientHeight, D.documentElement.clientHeight
28
28
 
29
- );
29
+         );
30
30
 
31
- $(this).removeAttr("height").css('height', innerHeight + 'px');
31
+         $(this).removeAttr("height").css('height', innerHeight + 'px');
32
32
 
33
- });
33
+     });
34
34
 
35
- });
35
+ });
36
36
 
37
37
  ```

2

訂正

2018/06/05 05:39

投稿

ysfree14
ysfree14

スコア19

test CHANGED
File without changes
test CHANGED
@@ -7,6 +7,10 @@
7
7
 
8
8
 
9
9
  ```
10
+
11
+ <iframe src="" class="autoHeight" frameborder="0" style="width: 100%"></iframe>
12
+
13
+
10
14
 
11
15
  $(window).on("load",function(){
12
16
 

1

訂正

2018/06/05 05:38

投稿

ysfree14
ysfree14

スコア19

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- ,,,
9
+ ```
10
10
 
11
11
  $(window).on("load",function(){
12
12
 
@@ -30,4 +30,4 @@
30
30
 
31
31
  });
32
32
 
33
- ,,,
33
+ ```