52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 2 H, M8 b- r% C% @$ O1 Z: P0 B7 W
1 V: N- ?1 D. K& a* S/ Q7 Z
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
: K+ s) t" @# d7 e- p4 u8 Y
  1. <script type="text/javascript"># A; G3 S1 g  A0 n+ B
  2. <!--
    ) [2 q  h; |2 q
  3. 4 O3 F" `8 X& ?1 v1 l- X
  4. var viewportwidth;
    3 i: _" M5 P" h. W4 F
  5. var viewportheight;" D; }+ R* Z4 `; a% H
  6. ! A9 \* Z7 I7 n( C, n& v0 H( o: E
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight+ G$ S/ Y& z, c3 {
  8. # I8 a9 ^+ q  C0 ^3 Z* g% O
  9. if (typeof window.innerWidth != 'undefined')" L, `) P5 ?9 O* y& P, ^$ _, A
  10. {
    . w: H! E) Q4 _" Y% w8 {
  11.       viewportwidth = window.innerWidth,# L( g- t; S* {) z. _
  12.       viewportheight = window.innerHeight
    7 {5 k$ `) H$ Z; K+ [, z: n6 \0 L
  13. }
    , I" I8 B& d1 G, e( L
  14. # V( ?9 ?8 w0 E+ X
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)6 J. D1 i& W% ~% S

  16. 5 M* R# V' _: V# }4 B- b8 f
  17. else if (typeof document.documentElement != 'undefined'
    3 d' Z0 e) [( f" e* p; b
  18.      && typeof document.documentElement.clientWidth !=
    8 @+ m7 @- H0 \/ w
  19.      'undefined' && document.documentElement.clientWidth != 0)
    - Z  W  s! m. m# \! a/ r
  20. {- B' K% A; L6 a: [2 P' i) Q
  21.        viewportwidth = document.documentElement.clientWidth,
    6 r' u6 F7 S; \! F3 [# s) v
  22.        viewportheight = document.documentElement.clientHeight
    ( l) x7 r4 }3 |9 ?4 i& N
  23. }
    & O! A$ V6 X& \6 K: m

  24. 5 J: U& g0 d, x8 O$ }  q% b: i
  25. // older versions of IE/ Y5 o+ _. ~8 o4 K$ P8 i( c
  26. 4 I7 J7 S7 U3 T
  27. else  [# t% N( a/ Y) n2 _# w
  28. {& Z6 T$ j: ~! P
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    " N0 p( i0 ]& S- X  N
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    , ~$ \! O' ^& m. y! A! ~
  31. }
    ) ?4 ]0 C( Y5 `) l* k2 n) z( v& C: k
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    ' I6 g0 t2 F4 r9 u
  33. //-->  J& q4 O8 s8 f/ K# W
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯' i  z, s" u. _6 v) P; Z6 B

- M9 k5 f& U8 l' g7 \' a$ l% `
: A# r/ `$ t6 f0 E; F
靘皞:
Get viewport size (width and height) with javascript
" c7 }' _: @+ o  L- {/ Z9 s/ @
; j. F. o0 X( U/ o
' c4 R' U" s8 q

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-27 16:49 , Processed in 0.080854 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵