52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
, ~- B9 \0 S; ]5 I2 ^; ?& q
! b8 x5 c( A8 N/ ~6 a3 x3 l餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
3 X( Y6 T! J% V9 `+ u# f
  1. <script type="text/javascript">
    # t1 n, V2 K: V+ J" T: R: p0 @5 m
  2. <!--
      G/ z8 }* O; F' c
  3. ; J" k( e$ E" z) P
  4. var viewportwidth;+ ]9 R, M( Z% n# y- \7 \1 x' C
  5. var viewportheight;% `/ x9 w' |4 h4 g, N# N

  6. ( r& X" N3 B" {. i+ ~
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight9 q" _$ D- ?5 B3 k' r

  8. ( `; O0 F5 H4 t9 Q7 A
  9. if (typeof window.innerWidth != 'undefined')2 z2 S4 U8 R+ i3 ]6 i( x) P) d
  10. {$ I- f1 w/ i3 ~, j& D  A) w2 b# p
  11.       viewportwidth = window.innerWidth,' Y: j9 m/ o8 D" F" v: K$ P
  12.       viewportheight = window.innerHeight: o/ e" Z* q) _! h9 |! \& H& Y4 `
  13. }7 K0 X& f" B) S  p
  14. 8 q# z0 q8 C, u, G! O+ S3 V: r" g5 b6 I
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    # z4 x6 C1 O$ d
  16. $ P0 B6 Y' z& Z( ?. n
  17. else if (typeof document.documentElement != 'undefined'
    ! B6 \- Z. Q% z7 c
  18.      && typeof document.documentElement.clientWidth !=
    4 o7 Y9 G" e0 a7 d" I
  19.      'undefined' && document.documentElement.clientWidth != 0)
    ) x: k% f3 K9 }  r* {8 G* Z
  20. {
    6 h& g2 Q; P( j$ _6 |* I/ T
  21.        viewportwidth = document.documentElement.clientWidth,
    6 Z8 _# a2 U5 r0 l# ^! Z/ |
  22.        viewportheight = document.documentElement.clientHeight5 G3 v8 k3 S4 P' N! @) Y$ C5 S8 ^
  23. }
    6 L% M$ }* V1 @8 a2 U
  24. 9 J4 ]" c3 }" N$ d" G# c
  25. // older versions of IE
    2 K" s8 D/ T2 u0 K

  26. ) g5 Z7 M4 {  T( u
  27. else% ]8 z0 v/ b* n8 i& f
  28. {
    1 @% S$ K4 j; f; K, f
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,, s; V7 _8 d8 U0 z% I9 Z
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight, m0 P8 j) X+ V  V: T1 B
  31. }& |2 i  T1 ?/ {+ \
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    % j( E( r3 K5 ]) e$ g( ~6 I( a
  33. //-->, {' M- @9 `5 j& K" s- n
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
; m9 U! Z- O$ \7 D; _; ?
# z" }4 Q" b& w3 f8 Y4 |2 Z
2 K1 C9 X1 w: j5 }$ Z' x0 @
靘皞:
Get viewport size (width and height) with javascript

- x# |8 c+ Q' U1 m' [+ \$ E3 X5 q- [0 ]) i! O

) H0 d7 {7 G7 j1 h: I

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

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

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵