52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 : e- V7 a% t' K

# I/ B% i8 o& i) _餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具5 w: A6 v8 e0 q3 I/ J
  1. <script type="text/javascript">
    0 S  R2 [. X) R6 ^
  2. <!--! W. `! w2 R6 Y. [0 x7 g5 H) c" e

  3. - l# E5 `0 J- ]
  4. var viewportwidth;. Z8 V3 `; R3 p, ]0 M" }) R
  5. var viewportheight;
    4 u) P" d8 c! Z5 x9 f

  6. % b7 ]: Q7 }( _; O3 z
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    ( w7 G/ t$ Z/ _1 ?+ W' d( o
  8. 4 \0 j& ^* j% ?. r' ^" C8 h& I+ m; Z
  9. if (typeof window.innerWidth != 'undefined')& o1 a8 j0 T% C7 s5 k) V) x
  10. {$ h/ W/ w% I5 W4 j, m9 s
  11.       viewportwidth = window.innerWidth,9 i$ Y6 w% Z6 r' Y; I
  12.       viewportheight = window.innerHeight
    4 `' O  [8 l0 I* C$ [5 B% Y
  13. }
    ' k/ ?  O3 r6 A: Q, ?1 R
  14. ; e) e) S+ p" v) e0 k1 M3 \
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
      A- A/ A4 ~% F9 H8 c+ m. L- Z) P

  16. , r: b3 }$ z: W" R
  17. else if (typeof document.documentElement != 'undefined'
    7 I# |  @+ @& @1 j% Y1 Y
  18.      && typeof document.documentElement.clientWidth !=6 N, S* s7 e) ~) G9 k% h( J$ T
  19.      'undefined' && document.documentElement.clientWidth != 0)
    3 W$ b3 R1 z# J4 I  G9 a
  20. {& X7 t6 _5 w3 Y0 y5 K7 w/ _& J1 U
  21.        viewportwidth = document.documentElement.clientWidth,
    , y- D2 ^+ n! T% v
  22.        viewportheight = document.documentElement.clientHeight
    ! z' n& p+ f3 Q1 g2 `+ ~
  23. }2 @  {- W! L" T% p7 I

  24. 1 L6 j; \7 s$ ~& K
  25. // older versions of IE' \7 _, c  a+ d1 \* j- V
  26. ) ^. W* S/ }" N
  27. else! O6 U" h- A. C8 l
  28. {+ @5 l/ ?) G1 R' v0 d
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    ! @/ J8 v4 i: F
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight0 Y% g4 O6 N% H2 K: z
  31. }
    8 d# p1 x: {4 O7 I- N, v; d
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    5 f  g( W+ h6 [  P5 j
  33. //-->; A4 y8 z8 W: f. P. _
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯1 e. ^3 Y% w; u7 D
9 e0 k" c0 i- B2 a- {8 U1 x6 o
5 |3 C7 c# }& v, k( L7 c
靘皞:
Get viewport size (width and height) with javascript

& p5 H7 @& n7 d) Z, C- y
7 c. Z/ ?* }" ~

% u; K+ \" X! H1 }9 n! J

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-23 15:57 , Processed in 0.069557 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵