52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
" p$ v, F0 O: r2 Z# m2 F3 F- d! K# {  j% x1 Z& e7 A' P* c9 |6 }
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具) R" w' J3 B4 f
  1. <script type="text/javascript">
    & }3 t  j1 H! }8 {2 Q0 {
  2. <!--
    . c2 Y) }& K' P# u* o- P1 z5 C- e

  3. 9 _/ t5 f- i' Y0 T
  4. var viewportwidth;$ o* Z1 M- Q) J" T% l* V: m0 M
  5. var viewportheight;
    - Q: q: s7 ^0 R

  6. 0 F& ?, i2 A8 N4 x! t. k
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    + O# U$ n8 W4 X7 i# j2 ]& {
  8. 9 `' g0 F' w4 @1 Q! ~' m: i. ^& z  E
  9. if (typeof window.innerWidth != 'undefined')7 N3 w! c6 a! C7 O% W: s
  10. {, k  z" s6 W1 ?( r& B
  11.       viewportwidth = window.innerWidth,
    ! Q2 k9 l+ A: ^
  12.       viewportheight = window.innerHeight2 p7 a2 q$ g2 X9 k+ J: O
  13. }
    " T, S& ~8 N! [# h# r$ D/ m: p, g

  14. 6 k- X5 l% W8 K  b. y, s/ O# ^
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document). b9 v' }7 t& I3 k/ x9 e# s! C* [

  16.   u3 T+ U2 ?; p9 T- I+ F
  17. else if (typeof document.documentElement != 'undefined'
    + [4 n1 H8 e1 n( z
  18.      && typeof document.documentElement.clientWidth !=' E  P0 D2 w/ T0 c6 D6 V+ u$ z
  19.      'undefined' && document.documentElement.clientWidth != 0)
    & [- h% h( o" F5 S5 k$ t
  20. {
    9 K: ?/ q! z$ A& R9 r# H$ g+ ~4 Q
  21.        viewportwidth = document.documentElement.clientWidth,3 z1 V; A0 Q: M+ d* r# B' g' p$ k! L
  22.        viewportheight = document.documentElement.clientHeight) O2 g* Y: l! A1 c9 ?7 J0 {
  23. }5 ]6 P- X) {# g1 b1 d
  24. / n9 Q/ R" n" A0 H, d& g0 ?
  25. // older versions of IE: N3 ?7 U  ?4 e/ y7 j" m' Q" v

  26. : Z9 V3 N8 `1 A- O: _2 \
  27. else2 z9 [" F3 Q7 A) }$ W) R; k
  28. {
      T5 s* X+ O$ L2 M3 f! K
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,4 q9 V8 l7 ?3 k, W
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    ; o, V5 d6 C# O( ]: V
  31. }7 T( ^3 p7 f- D7 H. B1 o
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');' a9 G' Q$ G% j) J
  33. //-->
    4 O1 j- C0 A5 E4 b. C8 h- E8 K3 L# ]
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯6 @' ]9 y9 f5 E) t# v( O+ R
* ?6 o2 G0 k% G
, ]' J# B8 b0 A2 Y
靘皞:
Get viewport size (width and height) with javascript
. S* @0 w- O1 I$ W  v* }, e# o

4 F% z1 n( B: V3 M7 i# i1 J

1 x+ ?) b# y& x! ]

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-18 16:46 , Processed in 0.057595 second(s), 19 queries .

蝯∠.撱

[email protected] | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵