52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
+ V8 R# w, x7 T( z8 I, f! e! B; g9 o' H, }8 N8 s! F4 W
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
' R7 J9 L' m* f; L% j6 s% k
  1. <script type="text/javascript">5 @5 C8 d; h7 N* ]; {
  2. <!--! ?& i, ^& j  b( }% t8 U

  3. ) Q( X9 x% r5 N) l5 [3 g) p
  4. var viewportwidth;. O5 X' g+ n( P* ]1 K6 W
  5. var viewportheight;
    . U8 o; l, n9 F: |1 M: c

  6. " k: A* _* w2 [- s% d) c
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    9 f5 b2 r  h1 ?6 d

  8. 9 A/ R' N. B- V! W9 l
  9. if (typeof window.innerWidth != 'undefined')
    - Q( e' W! Q1 f- K
  10. {
    ' D0 O0 g2 s& [. z
  11.       viewportwidth = window.innerWidth,9 d% [" c) p7 r  Z) m5 }9 W0 d
  12.       viewportheight = window.innerHeight
    ' X0 B: [# J# y- x
  13. }) r$ [+ U& N; T! j! M
  14. ; Y0 S9 k5 z; a- v  [4 h/ ^6 I
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    $ G, j5 C& J" f

  16. 4 i) q) w! _9 s" s1 J
  17. else if (typeof document.documentElement != 'undefined'
    ! ?# c# F' P* t9 f/ Z/ \7 r
  18.      && typeof document.documentElement.clientWidth !=; x& Q6 `+ C3 ^# A$ z. {
  19.      'undefined' && document.documentElement.clientWidth != 0)
    1 T0 S# o/ B# g" G
  20. {
    ; u; M: a  J3 {* k7 p
  21.        viewportwidth = document.documentElement.clientWidth,
    $ d( V- f1 J& b6 G) f+ G% a' I0 P
  22.        viewportheight = document.documentElement.clientHeight
    ' Z1 c0 n* Q4 V  J5 |1 j( c6 i
  23. }9 }: W; S# D0 F; @7 F2 [
  24. + U  U0 F% E7 Q7 K0 p' ?
  25. // older versions of IE$ P. T, B  f2 x6 `0 K0 {

  26. 9 C$ i$ p+ ?( I' ^) E
  27. else+ ]$ W2 b! q" d5 K! E& O
  28. {
    0 v, _0 v, Z4 f
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    1 o7 e* I) H; g
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    $ F1 u: ~" R2 I. r- l8 L
  31. }( `5 ~% k) n$ J$ @; Y: X$ v+ ~
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    , F- s( i# ~/ d$ L* _
  33. //-->
    6 N3 ~/ k( u& V
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
! W" R. v, [; Q+ w) }1 ?
1 F6 N* V! q( w0 Y! `( P
% |, c6 |2 v' u  U; x0 @# h# T8 _
靘皞:
Get viewport size (width and height) with javascript
9 y  \$ T6 h9 V3 @: G6 ^0 M
+ E$ b& c# m' [. A" [- g
. c' w* t$ {8 j, @' ~

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-1 18:30 , Processed in 0.069137 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵