52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
/ c) ?4 I3 l  P  ~3 z
& s2 n! L3 l: S+ m- Y餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具% V0 Q$ I0 h2 {# }& N' l- M  |; s
  1. <script type="text/javascript">! S" r: D2 e9 v# j$ ^1 z
  2. <!--
    - ~0 I0 n" _3 f& |( s$ s& d. D- N& t) E
  3. 0 [6 c# ~: Z2 |% N% |( f0 x2 `
  4. var viewportwidth;- p2 d  k& {4 n2 v0 m
  5. var viewportheight;: L5 Q7 n) ^9 ~7 I: h, l
  6. $ ~" q& D: \0 m. J+ {
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight! y' `, M' P0 M, F, Y/ u# C

  8. 4 _+ g& t; U, D+ L4 e8 ^; R
  9. if (typeof window.innerWidth != 'undefined'); ^9 H' j# c$ F( F
  10. {
    % V  P4 Z( D3 s% E) @! k
  11.       viewportwidth = window.innerWidth,8 Y! l$ U. }4 i: O
  12.       viewportheight = window.innerHeight
    ; D3 c2 y) R  Q6 F5 h+ x
  13. }& G' X; @- ~1 w3 l

  14. 9 ?( y5 |/ Y/ P! V7 e4 x- x: o2 K
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    ; W, v( p* T8 F

  16.   l, z, |$ f1 x0 x0 s  u2 Y
  17. else if (typeof document.documentElement != 'undefined'9 r" @2 }5 D& F5 v9 P- C8 E) k! F
  18.      && typeof document.documentElement.clientWidth !=
    & ?  x/ U* G3 B5 b
  19.      'undefined' && document.documentElement.clientWidth != 0)
    * G& o& k8 b% X; w
  20. {
    : ~4 K: _$ a  q3 V& V
  21.        viewportwidth = document.documentElement.clientWidth,
    % w" j7 F9 j" f: |. v
  22.        viewportheight = document.documentElement.clientHeight
    1 u. C( L% o/ w7 {" B; a8 S
  23. }# F( N0 Z: \' ~5 R3 c2 Y9 o
  24. 9 U4 n6 D, R1 {
  25. // older versions of IE5 _* x' v9 e7 b9 S& o

  26. + g2 Q% h5 ~( l, Q# Y. E
  27. else
    " W( Z* u% ?' B+ W
  28. {% v$ |+ P# D+ J! n4 N, c$ g
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,0 V, l" y/ ^5 I- q" Y, l/ h* G
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight+ p" a* p4 T) P2 p
  31. }
    4 i4 I6 E& o2 r6 |* {
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');& e! p& o, K3 C$ X% U  c$ i* z
  33. //-->
    : U/ o& c) W' Q. }& \5 _
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯5 `; {7 x  V  e4 y, n  N
/ V! y* \& M8 s
3 o0 g( a6 k2 u5 p. @0 v
靘皞:
Get viewport size (width and height) with javascript

: }5 \9 n' t' E* ^/ R, `! e
0 H' T* }6 W0 W" K; W7 g
( `( d9 p% r$ q% c

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-10-21 19:30 , Processed in 0.063534 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵