52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 8 s# k- k+ K9 h. J

/ B  V4 I0 {+ `餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
) y* Y) C( e2 b, X; Y6 A
  1. <script type="text/javascript">
    ( y+ L! p- a  ~, d" K
  2. <!--0 D3 W; ]2 A' P$ \: T0 i* R0 w

  3. + c0 }9 x  x1 I5 Q3 j1 P& H" o1 e$ X
  4. var viewportwidth;
    # F+ C+ J7 C" r) B5 w
  5. var viewportheight;
    # s6 w1 p5 ^6 L0 O

  6. 9 K  w- E! ]" h# \
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight+ x2 g5 R/ b' Q2 O

  8. . Q1 X$ n5 d! K$ A  i
  9. if (typeof window.innerWidth != 'undefined'), q7 g% b( u( v' [; i
  10. {2 t& p) w/ p0 `, k
  11.       viewportwidth = window.innerWidth,
    8 }9 m( M4 g* {2 J6 q5 b2 x
  12.       viewportheight = window.innerHeight+ h3 }% p% y. f! Q1 L) N/ U2 e
  13. }" ]* V1 a# V& `  B$ n0 i
  14. / J1 L) {' z, Y6 ~5 O7 i$ H
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    ( Y! x& P* @" y+ K+ Z8 ~
  16. $ ]1 ^' Y" |; p8 E& a+ S  S. L
  17. else if (typeof document.documentElement != 'undefined'
    & r2 s; \" H4 e/ W( @; I
  18.      && typeof document.documentElement.clientWidth !=. S9 e+ Q0 u, J! h8 g' ^
  19.      'undefined' && document.documentElement.clientWidth != 0)
    0 g" n5 p3 n* Q0 k( L" F+ b
  20. {, [5 G" S, N$ L/ d
  21.        viewportwidth = document.documentElement.clientWidth,
    9 K, K( n, g: l: S
  22.        viewportheight = document.documentElement.clientHeight$ b! f- s/ x7 o3 q( `
  23. }
    * Q; T; l: y3 B1 A

  24. ' z& @8 A# n7 s9 d: k1 u
  25. // older versions of IE; s+ H3 B" s4 b( A) i' E7 R. o

  26. ; D" A# S6 ~3 R/ r
  27. else0 Z1 b2 g1 T* `; A
  28. {
    # g$ ?9 q7 n& t) r1 @. z3 [
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,. y6 `1 Z& R; W
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    * c  a7 d8 O  F! T/ V& Q! b
  31. }+ J4 L, Y, M  I1 L; U6 d8 T0 q
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    % |7 z! ~' N: M9 ]/ |4 L  x: N  S* C# h
  33. //-->
    / A7 @; g# B* m7 h4 G5 b
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
! y& @+ @1 f: o8 n5 l 9 A. a( ~+ O2 R
" z& ]6 g6 Q% l# }; r' N8 x
靘皞:
Get viewport size (width and height) with javascript
. _) I1 H9 T( ]  c3 v

; J8 }0 H2 o5 N; f' C

, N5 B, a: d, d$ k9 I. A+ K1 t0 j

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-30 19:59 , Processed in 0.068589 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵