52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
- L! F. A* @) O+ N* Q1 G2 Q+ v. d" x( r2 o5 h/ C6 O
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具5 o' M5 Y: w+ u5 |2 G7 b( r
  1. <script type="text/javascript">
    : C+ Q, [9 W: y1 J$ @( n# O9 D7 k
  2. <!--. D# O2 _) F) u7 W8 D/ a9 `/ ^! a

  3.   s# ^$ F3 ^9 n% S5 Y. V5 f5 x
  4. var viewportwidth;7 a  l9 U& F- }& \9 M
  5. var viewportheight;( l* H% Z" ^3 O0 G
  6. 6 P# x" w, D( ?7 W
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight; O0 t" K3 I6 m0 D6 d
  8. ( D$ P4 w' K/ J; W( `( J' W
  9. if (typeof window.innerWidth != 'undefined')
    - A. K0 t- E; G
  10. {, }6 F; t& O3 b' [6 _0 |( g
  11.       viewportwidth = window.innerWidth,
    + g& g" C) L2 O" k
  12.       viewportheight = window.innerHeight5 @9 i, Y8 P! b1 m
  13. }
    3 S0 s4 `* B6 ]4 k2 i6 k
  14. + Y- A! W' ~; r. W/ Y  F. R3 I. w/ a/ x
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)5 I% a* ~/ M% L1 X% b
  16. + Q8 Z: }4 ^2 y0 |8 G) `
  17. else if (typeof document.documentElement != 'undefined'
    8 ?2 r% h2 T+ v( j+ G  [% Y
  18.      && typeof document.documentElement.clientWidth !=. @( `$ P8 u+ s$ {. e
  19.      'undefined' && document.documentElement.clientWidth != 0)  q* l! O) o  n0 {: {4 A# x
  20. {1 k1 h9 f4 m3 q+ U6 d; B# }9 U) h9 t7 e
  21.        viewportwidth = document.documentElement.clientWidth,
    . t3 Z' O5 M3 F4 O  T4 g% f
  22.        viewportheight = document.documentElement.clientHeight
    1 r9 I' I3 ^* {  e& ?, S4 I' ~
  23. }
    ; F8 c, d% ~& T" G6 Z& C) m* d* Y
  24. * f+ V; m: Z0 _0 p: ?1 D5 I
  25. // older versions of IE  Y* U) W5 e* F
  26. & h) h$ k' o: ^; Q  `& U
  27. else
    8 m. z$ h# Z( Y) I' z8 u
  28. {
    * N9 W0 E8 w6 [7 Q6 e) G) H) ~
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,8 I5 @& K" J- K
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    % w# A- [  h( @/ I( b
  31. }
    # D/ A  M" J, i$ Q% Y5 d
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    - i' {4 o9 W- E6 B% F
  33. //-->
    ) k( [" f# v5 V9 C7 ^
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯9 j  s/ m" K9 y
6 e# K2 M) u0 ^9 G8 G/ I5 H$ A3 J

. n% E2 S( g  {7 Y靘皞:
Get viewport size (width and height) with javascript

6 M, \  m( P. t+ x8 [6 e
, o  {1 z) s0 j! O
! y: b3 n# f0 E1 D" n6 p1 u

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-1-27 06:08 , Processed in 0.076345 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵