52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 , {+ U  D7 k, Z# i; k2 i# e& j# N+ W7 J
% |# E& F8 Y4 L! e" ]- z
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
5 b6 J$ k( I4 _% B
  1. <script type="text/javascript">  k. e$ T9 Z4 i
  2. <!--
    9 `  S7 W  l+ h" e* j% K) @  P
  3. ! q" N8 d0 Y- C0 [/ R
  4. var viewportwidth;
    & h7 ]) Q3 V6 h, j9 A3 q6 j5 _
  5. var viewportheight;4 P) z5 L3 D# I# o$ |% s

  6. : O* _) C! p. T( P- B
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight: z; N. D. `, i
  8. # Q5 p5 E2 y9 ]8 `* J6 T
  9. if (typeof window.innerWidth != 'undefined')
    & W! d4 {1 b% s: y1 Q
  10. {
    ; }( _) E/ \. z7 r5 H* `
  11.       viewportwidth = window.innerWidth,/ t( W- B/ M( {: f% g
  12.       viewportheight = window.innerHeight
    . I) }( Y  @+ C+ o! v# T9 c
  13. }" M; F) ?( ^; }1 H' y0 O

  14. ) j& v* m  ?' b  e, t) ?( Z# I
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)2 L- z1 N- ~1 E! M+ Q

  16. ; W6 }8 z4 L5 P4 I/ h5 X
  17. else if (typeof document.documentElement != 'undefined'3 G  j7 [- L5 p5 Q/ F( V3 m: P! L
  18.      && typeof document.documentElement.clientWidth !=
    8 x* l( |- P1 ~  O
  19.      'undefined' && document.documentElement.clientWidth != 0)
    : U* u  P" B0 n3 l. z8 s# ~1 b
  20. {
    . Y1 J5 O' V7 u: [6 h0 p/ E4 p
  21.        viewportwidth = document.documentElement.clientWidth,
    ! z, M: o0 E+ {6 h
  22.        viewportheight = document.documentElement.clientHeight
    " {! _/ j: U+ a% l# F, N# h. k# k
  23. }5 U7 c+ ]& K: ]+ s

  24. 4 G& n( C! ~, U! H3 H
  25. // older versions of IE
    , _7 t$ q" v) k+ {5 @7 m
  26. . t1 i0 ]+ j' g* A8 y3 K
  27. else
    1 x% O+ S( e4 [6 m1 s
  28. {
    4 J  q5 @- n6 T. @# d
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,2 Z1 `% D$ A; x9 ^
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    4 H! M, n/ f9 D* U  J
  31. }! z, u. N$ q# Y
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    : E' x7 O  z# k* e; X' d
  33. //-->
    ) V6 h( @7 a+ s* P4 J9 ?
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯- d( p- L0 J7 B; p" ?
8 k1 r) Q% b: h+ F; L! v) c# h

& c1 d9 o9 j. L: Y靘皞:
Get viewport size (width and height) with javascript
% L2 ^3 H6 e1 S4 E( x: B# w

3 i* h6 Z. m8 r
% t0 g+ n. q: j) B

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-12-5 22:22 , Processed in 0.077411 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵