52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 : d9 i# P4 w+ m2 x. |
4 s; _( \7 I6 @8 x
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具7 Q- I" e% z: n7 d3 E. h
  1. <script type="text/javascript">
    ) p* J% w+ Z2 N
  2. <!--
    6 [9 ~, s2 I: L% U
  3. 6 a8 x- X' r3 s
  4. var viewportwidth;
    ( m2 Q- R1 \. l; J+ E: a
  5. var viewportheight;
    : q/ p; H# j8 r0 p  d( F/ r
  6. 8 L$ n2 G7 q2 u7 r0 A2 D9 m
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    7 l% Z) a4 j) f- N3 [% n% B1 h

  8. - Z( X0 b( O% i7 ~6 j  k
  9. if (typeof window.innerWidth != 'undefined')
    ; I' q7 F: Q9 i4 u1 n
  10. {
    7 b1 M" f) j( T0 q1 Q
  11.       viewportwidth = window.innerWidth,
    8 R6 y3 L3 q: Z- m
  12.       viewportheight = window.innerHeight
    1 `3 C4 v* E3 M% e
  13. }
    7 G9 X! N% n/ J9 r

  14. 0 d% l/ p; E9 H4 h
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)7 g5 ?$ W0 u3 g6 V1 T

  16. ( e6 \! H' p1 d/ b6 E- G. ~
  17. else if (typeof document.documentElement != 'undefined'
    + w; y! n9 g; b4 K( m
  18.      && typeof document.documentElement.clientWidth !=
    + q! ~4 A, n) h1 g& v
  19.      'undefined' && document.documentElement.clientWidth != 0)( `0 X3 U' @2 M" `' v
  20. {
    . V  N. k! \  O9 w- M
  21.        viewportwidth = document.documentElement.clientWidth,
    9 X# q  W# [" p  R
  22.        viewportheight = document.documentElement.clientHeight
    % m: @& a( c" C1 d: O* Z- X$ m( B6 S
  23. }0 W/ m) q$ k. w
  24. . D& @2 z& I: w, ]( C
  25. // older versions of IE
    : ?" ^8 Y& ], T6 l

  26. / z/ h9 I& P2 v
  27. else
    ; Z  z/ L5 n6 ^6 S! \$ [# O
  28. {
    ' F9 D- A* [% Z* Y
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    . X; H  ~, A0 R( [* ]
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    , c+ u( h4 v# U5 ]- U. c! s3 g
  31. }6 f6 F1 l$ n( F( V
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');7 ~0 ^6 s4 O8 U
  33. //-->
    ) E5 E% T1 r9 C
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯+ j" T6 `1 Q1 R, |
# K4 g; {( S% b+ d- ?  N; E' e5 }
0 N0 E. C0 @' E$ z
靘皞:
Get viewport size (width and height) with javascript
# X* Q' n5 o& q, ^+ e9 k7 P
* I- H( U/ f1 I7 y' C* F$ I

9 h# d9 D& Y6 B4 G: i' W

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-10-21 12:43 , Processed in 2.245110 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵