52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
1 _: y' y- t# A. k7 W( j* a* F% p" m1 y. @; n
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
3 n* B& W- C( K, c! ~
  1. <script type="text/javascript">6 F. ^# K/ f+ t9 t0 V+ j/ \
  2. <!--
    5 n/ \* {9 U) _) K

  3. # J, B7 K% W9 U7 w
  4. var viewportwidth;! p" |7 F5 \. `6 i4 l
  5. var viewportheight;
    7 U5 a" w9 t- e
  6. * p, D9 X( A- P" W4 ?
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight4 u3 G( }0 L) Y5 N" g
  8.   _! u- v8 F8 M7 I/ x! ^
  9. if (typeof window.innerWidth != 'undefined'); ?1 k, r, C/ Z$ F' R3 Z
  10. {7 Q) z$ E9 [" |: P% Q) j/ [
  11.       viewportwidth = window.innerWidth,
    : K7 ]: \5 I3 b2 a( \( q
  12.       viewportheight = window.innerHeight
    : ^" M6 n0 s( x5 b) T
  13. }" t5 F# `! h( N0 s' |( k- k$ J2 N, B
  14. 3 G% c/ s3 [7 j6 |
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    , S0 C+ l; n- K2 e6 G

  16. 9 K# t1 d! O/ J) J
  17. else if (typeof document.documentElement != 'undefined'
    - O/ |$ X4 m8 k2 C, T  h
  18.      && typeof document.documentElement.clientWidth !=* B7 x; R' }! ]) n
  19.      'undefined' && document.documentElement.clientWidth != 0)4 k* I4 N8 v, ?! J- p' }
  20. {
    / y9 Z" c7 _4 |. Q5 S, l
  21.        viewportwidth = document.documentElement.clientWidth,) m$ {9 M5 Q8 V2 M( P/ z* ]
  22.        viewportheight = document.documentElement.clientHeight
    1 \9 z" L5 T0 q3 [: V( Q8 W7 W" j7 d
  23. }
    ; z4 c" g6 }6 h8 F0 T! D: h+ C
  24. . q/ ~, J0 {0 _) z
  25. // older versions of IE2 o0 f. h& t$ O9 x1 ]

  26. 2 M+ \9 _+ {, V4 Y  Q! c& C4 h# l
  27. else
    . Y3 ]/ @8 U2 N& h$ J# E# C3 ^+ Z
  28. {
    2 Q- Y$ W5 _9 x2 m$ U; f
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
      c( ^* I9 B1 B7 C8 `6 n
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight  x# `) A3 I4 V! K0 y
  31. }5 C  P8 m& q. p+ {! h- |" Y
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    7 ^5 i1 v; Z5 T! b* q  V' P. K
  33. //-->
    4 I* B' ~1 [! q) A! j
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
! Y, \, o4 A( A5 w+ E1 M 9 a/ Q1 L/ O: f
& \( ?) q  f$ R& p  g+ f5 k- h
靘皞:
Get viewport size (width and height) with javascript

/ _7 m1 `2 p% ~9 }" ?5 K7 u% F8 u# G: V. ]. @" F; P
& t+ P' U% {8 I! f0 {

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-2-11 04:09 , Processed in 0.057071 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵