52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
- Y3 i$ Q) V1 L  s1 R  a
. L+ u7 A# x+ Q1 j9 B) z餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
* N) q' s$ |0 q2 }! t- e- u; \
  1. <script type="text/javascript">* F4 C0 x, O# p' i* c
  2. <!--* }8 Z2 J' p# A( e) z

  3. 9 ~4 [, t, p; k) @: m
  4. var viewportwidth;
    , h. B  X( U  {0 [- m9 B3 M% N# J8 S
  5. var viewportheight;5 d& r( d+ w2 U; u9 y
  6. ' b$ h) s9 I1 A
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight) b0 \" e( ]/ V" H; }& R
  8. : M6 Q4 Q: ]7 t: w- {" z% m6 W, P
  9. if (typeof window.innerWidth != 'undefined')
    . u" n2 [8 L, @/ Y: `
  10. {
    / l2 B5 O& @* ]
  11.       viewportwidth = window.innerWidth,3 M4 i$ G. i" V
  12.       viewportheight = window.innerHeight
    - X1 g( p4 @: E" U6 y/ }" V
  13. }+ ?; K* q1 E8 c$ H

  14. 5 b: y# r0 o& i1 _( o8 d
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)( r6 ~5 I+ k' \1 y/ O3 J; q

  16. . c5 ?) W# W  ?# V, U8 o$ T$ p  h
  17. else if (typeof document.documentElement != 'undefined'
    3 e: W+ v0 i" T" o7 D% v) n4 f
  18.      && typeof document.documentElement.clientWidth !=
    4 A& e0 N( |2 E" q% o1 ]
  19.      'undefined' && document.documentElement.clientWidth != 0)/ m# G( K; E+ I- _/ ?
  20. {
    5 i, c0 b+ b6 l0 v/ ], W; @
  21.        viewportwidth = document.documentElement.clientWidth,
    ) n* ~" y/ \' A, a- m$ ~- ~4 d3 t
  22.        viewportheight = document.documentElement.clientHeight" a/ m/ P  r- Y' p: Q0 j) d# U
  23. }
    - U0 Z" Y0 O* h9 T" t1 o
  24. 3 n: }  A! D) H- |, u* H
  25. // older versions of IE: J' T  G/ Q4 W7 }

  26. 0 W8 T$ V8 [. Y" w: ^
  27. else" v! L- U7 [/ l# A6 c( H( q+ s
  28. {
    4 s" B( q0 W# J5 `
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    9 C, ^1 \8 C: S% @7 l
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight+ s) e, b9 n! r0 K" T
  31. }
    : D1 J( u4 c4 p
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');; x$ w% C  M! L
  33. //-->
    " k  k, e: |+ D0 J% I
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
' V: O0 L- N7 }4 ] 8 n- P1 Y! s) N
/ i6 t. s* V( _; p0 J
靘皞:
Get viewport size (width and height) with javascript
& f5 y8 i) k/ N  ]+ F) ^+ o
2 b) \% _4 x) t0 b% {% f
) p6 C) |& U6 [7 t

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-29 05:11 , Processed in 0.075376 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵