52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |甇摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 8 t; x- ~6 O5 m, j" i
% z3 E( h6 k* u( w( `
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具) _7 S% G6 r8 t
  1. <script type="text/javascript">
    ; x9 J# E: Q, c" b) V5 [% d% k5 b$ O
  2. <!--0 S8 L- j' H( ?# S" K! F+ K
  3. : v! E$ p# U4 x! k8 K/ ~
  4. var viewportwidth;
    / r- A# Y* I5 D: n
  5. var viewportheight;
    - ~7 M9 Q6 p9 D+ w8 p
  6. % o4 h& ^  V' T" |9 N# t
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    8 n" Y: Q3 O& y$ m( P2 b

  8. 1 N% J0 c6 S  H5 p5 j. c8 ?% l- ~
  9. if (typeof window.innerWidth != 'undefined')
    ( C, |7 ]. S; P" P
  10. {2 P( A" n, }1 P( v& }* x& }* i
  11.       viewportwidth = window.innerWidth,4 \( O$ z! J1 L' W) Z
  12.       viewportheight = window.innerHeight1 Z/ c. p3 u3 F
  13. }
    & D! w0 v0 ]2 B: D% n5 |# |+ U

  14. % m. T! U( y  ?9 d. E% G$ i' d
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)8 l* L( f0 V8 T& I# c3 [/ e* f/ H2 [
  16. * X: T, V+ B- ~5 L
  17. else if (typeof document.documentElement != 'undefined'
    ' u  V# R1 Q% ^4 [. m; h& k4 U
  18.      && typeof document.documentElement.clientWidth !=
      h& h; M) B2 q9 B: q2 n# ?9 z
  19.      'undefined' && document.documentElement.clientWidth != 0)& F- ~3 z1 Q+ \* m! h9 \2 o
  20. {7 c+ d( }5 e9 B7 {
  21.        viewportwidth = document.documentElement.clientWidth,
    ( V: O( B3 i: C# w& o4 A
  22.        viewportheight = document.documentElement.clientHeight0 w# _* {( `# ~
  23. }/ }* ]/ n2 J  S2 M
  24. 5 u. H' i7 l5 d, c8 i6 l8 @
  25. // older versions of IE
    ) Q- F: B+ e) r* }1 o

  26. & c5 m5 s/ R* Y5 _3 o
  27. else( U& Q/ }, S' f9 b' d
  28. {
    9 M9 q0 u3 `+ W+ ?% e& M; V6 c9 N
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    / D' v, J8 Q; U7 o( C# L0 S. f  A
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    ( f9 v5 t: X" e/ t- v' j0 M
  31. }3 W2 e6 y$ [8 V/ {6 Z
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    6 m* S5 z! Y. s8 k* l3 N& S
  33. //-->" R5 A/ }0 X$ u# A! B: Z
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
9 j$ r- f) L" R
7 {5 U' D5 {6 D# j7 l9 S
4 r: Q2 g4 ?9 R% y
靘皞:
Get viewport size (width and height) with javascript

# X% g/ d, ?' g2 }
6 B/ r. J, \6 v2 j4 W

# g& d" w9 U# X

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-10-21 21:22 , Processed in 0.071528 second(s), 20 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵