52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 ) m7 s( H% d  p0 j8 g# `
/ t5 U# J6 J" t$ K5 k& v( L  Y  s% m' ?
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
' j, B' g3 @1 {2 [
  1. <script type="text/javascript">4 d: ~3 l' f% z# u9 }, T- e. D
  2. <!--
    ( ?; t- q2 D# k0 R  j/ Y

  3. & Q7 [4 w3 E& U3 J1 [
  4. var viewportwidth;' d" Y" F. V  x* H" a3 R, _  e8 [: e
  5. var viewportheight;) ^( M  e3 m8 \( n% o# B) m

  6. 3 _0 n& x, U( K6 R5 Z' K! p8 O
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight, F5 W( ]. i4 A# c1 K1 ~

  8. * d6 R4 {) K0 i8 n
  9. if (typeof window.innerWidth != 'undefined')2 Z' T3 v9 {* E8 |, j: K
  10. {
    # `7 H( r3 i! M  O
  11.       viewportwidth = window.innerWidth,, f. F! P, H: Z
  12.       viewportheight = window.innerHeight* U" ~; ~& R! K; G# l% P
  13. }
    1 S$ \: J. ?6 l, _
  14. + Y' k8 m, l  l, I
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)4 p5 x# @/ x# n
  16. & S, L, z" [8 h9 ?* h) Q6 L( X2 l
  17. else if (typeof document.documentElement != 'undefined'& T- s- D* I0 G$ _7 i
  18.      && typeof document.documentElement.clientWidth !=
    : p2 c0 f8 B2 F/ Y$ O5 ?3 q8 O
  19.      'undefined' && document.documentElement.clientWidth != 0). G. U3 ~3 _& i
  20. {
    3 L3 e" f# ]" F. {6 [8 J. }
  21.        viewportwidth = document.documentElement.clientWidth,
    1 o+ y8 P9 k! T# F8 t
  22.        viewportheight = document.documentElement.clientHeight* }) W% o  ^; J6 u
  23. }
    4 {/ b8 W0 j( A6 j

  24. ( W" f3 ~5 X8 w& W
  25. // older versions of IE
    ) T# O3 r0 P3 r1 p# U5 W5 d

  26. ; H; l( j& Q5 w' x6 x+ F
  27. else$ C2 k, E) ^, P( ^
  28. {( X1 a' W; |* D2 A; F: J) M
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,- G; k7 _7 ?0 L) Q3 A; {& W+ x
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    8 a9 l# q5 F! ]. U% {8 I: C
  31. }
    & ~! Y# Z' K" l; \
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');# C; x7 s6 y& \6 M& |) x
  33. //-->" f' B7 D1 C8 s' b
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯% H7 Q* `7 ]" J" h
+ g% H" S0 `. D7 L4 i
% T9 y$ g$ l0 R) ~) J% g
靘皞:
Get viewport size (width and height) with javascript

+ O9 y. [4 S% l9 ?& a8 z
7 o1 k8 I! @+ W* n

4 L5 \: V  U+ _" Z

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

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

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵