52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩   Z, _! x& Z! l: w

, W5 k1 S/ S5 s5 S餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具1 Y  w) a* f0 Z8 B6 x& _
  1. <script type="text/javascript">
    + V/ _  \7 g6 X4 W% A
  2. <!--: f. f8 K2 j6 X! s$ a- ~6 E. B( ^+ J
  3. ) @$ W, {5 x, P( Z) Z( E7 P3 ^
  4. var viewportwidth;" ~+ k' }6 e2 p* Z
  5. var viewportheight;: G/ h- K  Q' J* i, p6 ?7 D; l

  6. * H2 e, N4 a5 a
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight, A3 u. R. t, O; W3 _. t

  8. ! A* w+ b; a( w8 x0 b% Q6 C; r
  9. if (typeof window.innerWidth != 'undefined')( [' k4 l" T8 ~, T
  10. {
    2 [. U5 p: `1 L4 o
  11.       viewportwidth = window.innerWidth,6 Y' S8 _: _# U1 [6 @6 b! z
  12.       viewportheight = window.innerHeight2 a# v1 A. R& K3 m
  13. }
    # \4 N$ b  f% X$ F7 L. I

  14. 3 r' W! R. H0 V& ~
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)) D; o* h+ i" P, @3 R6 g+ A" U

  16. 4 V. z: q, U6 W
  17. else if (typeof document.documentElement != 'undefined'
    2 v/ E$ A+ J7 w5 P% Z6 ^
  18.      && typeof document.documentElement.clientWidth !=
    ( l, `4 o8 v" k2 h* ]7 P& w' J' e
  19.      'undefined' && document.documentElement.clientWidth != 0)) ]$ F/ ?$ y  B8 c) W8 n7 s3 a2 y
  20. {9 h7 s( K$ y" J, U( }& Q# L& a, a
  21.        viewportwidth = document.documentElement.clientWidth,
    9 O5 Q7 J* V3 t9 }( l
  22.        viewportheight = document.documentElement.clientHeight
    - r# b7 y+ e5 I- V$ N: r5 q* H/ ]4 l, ]
  23. }, V2 o* B, m6 q( f8 ?9 f/ w+ }7 \
  24. ! Z/ e. N& D& y& W0 U3 N  L
  25. // older versions of IE
    , H6 ~7 U  T/ A+ k8 ?6 ^, y/ Y

  26. . ]- Y& q+ B! C! D& r4 h
  27. else9 X+ Q/ d# ]! _4 f
  28. {
    + s! q. [1 x: T. A( H
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,% M4 X' N; Z3 o) h# D" g
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    & U+ @4 p- \- C, F
  31. }$ b2 ]9 B- I; S8 y; W
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    ( W- G6 B1 H0 A
  33. //-->& n8 i2 Q$ j: L% d& A
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
8 H# M4 }% O( N( q) o: n/ {
* `2 J, Z5 y5 h) j

0 b6 \, I+ p" M" R$ r0 C7 V" o. `靘皞:
Get viewport size (width and height) with javascript

2 r6 O# q. o0 B. h% y' }  @9 ?  Q7 O* B& E3 u2 ]0 S; ^

6 S* M9 f0 p6 i' ]2 }

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-2-12 20:00 , Processed in 0.069961 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵