52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
     
亦: 4098|敺: 0
銝銝銝駁 銝銝銝駁

[HTML] 敺桀航閬蝒批捆撠箏站--Javascript[1撘萄]

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 4 O9 @0 @) C2 E2 u) v
+ r9 I# N/ e8 J: W2 t
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具6 u2 M6 ^* J; f# e9 d% g( v
  1. <script type="text/javascript">: S# T" W) M5 v' u: T
  2. <!--
    - ~- y- B5 C9 r. G8 M* x3 P; Z+ b
  3. . h/ i& W7 V9 X$ T$ ~
  4. var viewportwidth;) B, P& \: l! D3 A. ?; y) S- P
  5. var viewportheight;
    6 F8 y, J, K5 a: q& \1 O( ?1 j
  6. , K$ U# U/ L- E# v) q$ p8 z
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight  V2 u$ O- P, V. M, a4 R' W
  8.   f0 b/ {, G6 T- D7 M
  9. if (typeof window.innerWidth != 'undefined')( @0 G6 V2 v- u: K/ f+ {0 R9 c7 s
  10. {' g0 w* ?  N% X' m0 m
  11.       viewportwidth = window.innerWidth," A) {3 G% Y! j* Z7 [& [
  12.       viewportheight = window.innerHeight4 m( I  s. }* _: m# B9 z4 g
  13. }
    4 v6 q+ Q3 r6 h( K- T4 L

  14. 3 m# p# F. T& F% \
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document). i3 Z, j8 R5 Q1 R- q/ s) G

  16. ( W9 K7 N% C2 b: H" u& g6 R7 K+ H
  17. else if (typeof document.documentElement != 'undefined'
    8 A. h( {& v( d# h, f/ u; i
  18.      && typeof document.documentElement.clientWidth !=+ R( ~- R$ I/ A( A
  19.      'undefined' && document.documentElement.clientWidth != 0)
      ^3 G, [2 X- ]  j
  20. {0 k+ C/ u$ s, {9 p
  21.        viewportwidth = document.documentElement.clientWidth,
    ' ]8 l' `3 O) m- U
  22.        viewportheight = document.documentElement.clientHeight; e; o1 W' e  j. I9 E
  23. }9 p2 N4 h8 z9 K; w6 }/ y$ E

  24. 3 ~/ r1 r) R3 c/ _2 t: \
  25. // older versions of IE
    * b; h4 J0 d: ?  l, Q* e* ?+ g

  26. 3 N8 c* i2 ?+ U! f
  27. else
    8 C) b2 U' x: D5 A+ k
  28. {
    $ Z7 R- j/ x) J. |
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    # U, e' v& _1 D8 m0 K
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    6 m5 v" ]$ o9 l' _5 ?7 Y
  31. }' ^" F1 a3 ]5 H# e1 m  E' k
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');! V) @0 j( j# l! L5 J
  33. //-->! s6 [; b0 e' C
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
$ p6 z. r# B% T% ]
, g8 k4 |, k4 N) V4 G

) _3 f9 `; x6 a$ Q* ~. P0 y靘皞:
Get viewport size (width and height) with javascript

" w" F& v5 a+ p7 c. X0 V" P. U9 Z$ H5 O) T& [, i

8 _7 @! d2 s$ E' V$ B

雿輻券

祉蝛閬

BT蝳

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-25 16:20 , Processed in 0.068148 second(s), 19 queries .

蝯∠.撱

[email protected] | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵