52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 / ?* b7 T( v' Z

2 j( C: e  D0 r# r餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
/ |4 n# G% Y7 f
  1. <script type="text/javascript">6 t4 |* J0 ?& O( a& O
  2. <!--
    * q) Y- e: x% q* B& z* y9 R& f3 j
  3. 4 Q) d1 H+ k2 c5 B3 h3 g
  4. var viewportwidth;8 J* V) }  a( R& C
  5. var viewportheight;6 b, N: a7 v6 d( h! e  L
  6. ! N( t% o9 X7 @3 \2 H2 k2 K
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight2 d6 o2 A8 A5 e1 t: R% C$ R/ |" c
  8. + ~; s" X2 o+ ^0 b" I
  9. if (typeof window.innerWidth != 'undefined')* k) }8 C2 v5 J8 t
  10. {. X% f& ]! o3 R# I; Q3 |
  11.       viewportwidth = window.innerWidth,3 x* B- `  N2 u
  12.       viewportheight = window.innerHeight
    * _3 L& G/ b! \9 \7 u4 N
  13. }( U8 B, r1 E  a6 i4 [& a+ y* h
  14. / P& ]0 ^0 E0 L
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)! r7 t/ z/ A; L& ]* j' [/ p2 w

  16. $ o& [) [. h4 E# C
  17. else if (typeof document.documentElement != 'undefined'8 G. c3 S% h0 X' u2 s) R
  18.      && typeof document.documentElement.clientWidth !=
    0 L; l. m3 R# L7 Q  N
  19.      'undefined' && document.documentElement.clientWidth != 0)
    6 B9 L2 k$ n7 e' C4 V
  20. {
    ' u0 a- v2 J8 c6 i
  21.        viewportwidth = document.documentElement.clientWidth,
    & N$ l1 n1 `& g8 Z2 f6 `" T  A
  22.        viewportheight = document.documentElement.clientHeight
    , z! Y  j! S5 |- o9 g9 @
  23. }+ B( @7 Z; Y6 N$ F/ B/ y# B" @3 E0 x
  24. ' N+ b; ]- r6 g  ]5 r1 A, F
  25. // older versions of IE
    ) q4 Z' A7 k  f5 M
  26. . _$ t2 f0 i- M7 O" j
  27. else  |' h( ^- K% F. w/ g# k( B* |' {
  28. {
    ' F3 g8 |$ e/ L( m3 P) }
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,! M8 E( E4 l8 C% |8 W+ X9 w$ g
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight" m' L4 ~4 @2 [& d) D
  31. }
    - ^! ^5 w, o0 Y- \
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');5 p* A  h4 G  T
  33. //-->
    2 h1 a( t& ]3 M
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯. V1 D( T/ x5 A; I  b  l0 p) R+ X. J
0 i$ w/ y7 H" ]

1 o& k' c* c3 [7 O. ^4 n靘皞:
Get viewport size (width and height) with javascript

8 G( A  l: d# P* d9 \
' I# y: A. E8 }* f1 q+ j) m9 O0 E
5 H' p' ?/ H; ?0 V* a

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-12-6 05:41 , Processed in 0.060689 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵