52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 " }+ l2 j! ~% x) ]

7 Y+ s, W7 Q0 J' X1 }0 E) u! L2 A餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具( F  f2 A+ C' \3 F! f
  1. <script type="text/javascript">
    * g( ]7 e& b! j' O2 }
  2. <!--0 ?, a! K$ Z+ @/ O3 v) Z" v5 t

  3. 5 _3 @  X8 N+ `4 k4 q
  4. var viewportwidth;# x6 \2 V5 O- c( E% D; o
  5. var viewportheight;
    7 `) ^+ F# l( b6 n  D/ j2 H

  6. - H5 _- e! X% Y9 ~0 L
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight+ u* ^: N) [$ l# e2 n5 V, S

  8. , `! B, ~0 u, N  Z
  9. if (typeof window.innerWidth != 'undefined')
    ( f/ v3 o8 C' W4 F, Y# o' @! y
  10. {# V# y/ a+ ?+ H
  11.       viewportwidth = window.innerWidth,
    $ \7 u( D% {. ?7 P
  12.       viewportheight = window.innerHeight' E: k" N; y; A& ?) D; K! ?
  13. }
    ! o3 @& |5 O) n/ f2 P3 O
  14. * I) Q) J- _+ d" }1 e" R
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)5 a) A4 w( k$ ~) |. W

  16. 3 [4 t: j8 J& S
  17. else if (typeof document.documentElement != 'undefined'
    ( z- j- l2 z+ p& M/ `* n- i, m
  18.      && typeof document.documentElement.clientWidth !=
    / J$ Z+ P! e: _) E3 d9 \
  19.      'undefined' && document.documentElement.clientWidth != 0)
    3 c2 q. g2 _& N
  20. {7 S% S5 S- |/ F3 K' C
  21.        viewportwidth = document.documentElement.clientWidth,( P1 ^! z9 S3 M/ h# `/ B& G/ t
  22.        viewportheight = document.documentElement.clientHeight
      M! w% ~8 B/ n+ @! A/ S% p% W
  23. }3 S7 U" K/ A% u8 }

  24. - \* ?; O$ D7 h4 k" _
  25. // older versions of IE
    ( B' k1 d6 n1 u4 f3 j9 ^0 |, P
  26.   _8 x. G, K/ k# J: }. T( P
  27. else# w  E. p; x# ], k& N8 {7 D2 D
  28. {5 v6 v: f2 Z8 m8 z
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    + @3 n9 p3 `' r( Y5 A
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight! H' Z7 J# _3 u
  31. }
    # U6 b7 i" p8 J" i% ^* @
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    9 E% N' k) A* S% @  q" v
  33. //-->
    * ]# A: {- n. ^- h! i9 U
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
6 l. a( y3 T" O* i ( o  }& {3 n# P4 \
! ~8 B; _* ~1 j+ U
靘皞:
Get viewport size (width and height) with javascript
4 y) i8 d1 x+ R: y" a. q9 J
% Y9 `  G  D  u2 J9 M0 B' w

7 O' K* E$ |, _# F7 B) h9 x  R

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-4-7 08:22 , Processed in 0.075935 second(s), 19 queries .

蝯∠.撱

52avtv@gmail.com | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵