52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
5 S$ I. @; E' k  f1 y( @9 g# t; n
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具" o( P: @! a& ]* D8 t: Z
  1. <script type="text/javascript">+ r1 f3 N6 ^* V, I
  2. <!--7 H6 _) F( g: w/ u5 l3 X9 a

  3.   b3 w9 z0 M" _
  4. var viewportwidth;
    ; Z1 A, B, d0 d( |9 a  I
  5. var viewportheight;
    # A$ m8 @* d( Q( V
  6. # x! R% q7 G! b
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    , E! p8 e: i# x. _0 @: M; Y, `
  8. + y9 e2 p* K0 P' Y9 a  }+ L
  9. if (typeof window.innerWidth != 'undefined')% K6 j# k0 s: V0 y# C" K
  10. {
    0 h" r( J2 K1 R& P4 m& t; O
  11.       viewportwidth = window.innerWidth,
    / `4 o: r0 y/ ^; A& c* A9 _7 O7 X2 x
  12.       viewportheight = window.innerHeight
    / a( O. X& w# M1 m. O- \2 i
  13. }
    , c$ k, i  P/ S( O9 D0 s

  14. 2 d, C. `, e$ Z  r" a* _" V
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    0 g; x8 k# u0 |7 R$ R6 j

  16. % |  T2 L/ s% O* n
  17. else if (typeof document.documentElement != 'undefined'
    . c% M9 b1 z7 B
  18.      && typeof document.documentElement.clientWidth !=+ [/ e5 g9 Y2 \* j9 e
  19.      'undefined' && document.documentElement.clientWidth != 0)
    " W% y- d0 T/ m, {1 V& ]% g. ^
  20. {, C# P' P9 \+ t; J; J: s9 ~: a
  21.        viewportwidth = document.documentElement.clientWidth,
    / u. b4 H# O, Z& u6 I
  22.        viewportheight = document.documentElement.clientHeight$ @' ^6 Z6 h% g" @2 i/ h
  23. }! c% [( y6 z9 K* q

  24. 5 c. X0 F. G0 b9 q: U" y+ x, q
  25. // older versions of IE
    ! {& B9 g( o0 X8 M

  26. / Y3 ]  d* U7 e# M  H5 V
  27. else( R, F1 B: ]+ |! r- y. S  @. M/ S. ~
  28. {
    ; K7 M% n- n) l% j& G! C" s1 X" J5 ~
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    , A& H; U% ~& p6 q
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    ' G% d% g  y" N- m- z- x
  31. }
    9 z- D' U' ~; z" ~8 q, m
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');; n) f0 f7 w, B) n# e) U: f
  33. //-->$ i' q5 W" X7 u  [0 M7 G
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯6 Z! E: X  z) P3 a) N# G
! F1 V) o: M! b+ z
7 i' s' {! K& {8 J
靘皞:
Get viewport size (width and height) with javascript

1 Y5 ^- k; ~/ A8 L$ n) U% \+ f. r' a
( e/ y2 v. I' t+ {

7 n5 Y' R& `& I6 n3 E

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-21 19:51 , Processed in 0.057404 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵