52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
6 I6 V/ Z, F  A6 f& J9 `( ~  G" l3 v- C% H- r, U
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具- @8 ^) s7 a# I- f8 {& r2 C
  1. <script type="text/javascript">  f' ]6 {* c* ~4 Y) H" ?
  2. <!--# T* K3 d4 G  r, G+ q

  3. ! d8 a( a7 h- H+ u; r/ ?. k
  4. var viewportwidth;. E# P7 V  T. J
  5. var viewportheight;
    4 E2 [2 d  B: c+ w- p
  6. / c8 N/ m" H/ v. Z, H, k* r  ?4 j8 W
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight  L8 |$ x8 g2 B. W" H9 t9 D2 I

  8. ; `7 c% H3 q, r
  9. if (typeof window.innerWidth != 'undefined')% a( T9 q+ H3 Q' v* g
  10. {2 `5 t' O) a; h5 b- v2 w0 x! ^
  11.       viewportwidth = window.innerWidth,
    - M; t4 P" E1 _* u6 L4 u
  12.       viewportheight = window.innerHeight
    - O/ c% z) w0 u" N0 g4 @5 `  |* r
  13. }
    ( n  v* H  d. p5 ^! l# W  M

  14. ' g/ o) R; p0 E, c. T' t
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)- P$ x+ x9 H/ U
  16. 4 c1 s% P/ ]! |# V6 n
  17. else if (typeof document.documentElement != 'undefined'1 |6 z' i7 h5 _3 ^
  18.      && typeof document.documentElement.clientWidth !=/ ?/ |0 X$ `0 K* M
  19.      'undefined' && document.documentElement.clientWidth != 0)
    5 \1 k  T/ w4 R2 p& n) F% p
  20. {
    + k& B, R+ v7 C9 x) e
  21.        viewportwidth = document.documentElement.clientWidth,9 x4 P* e* R* x. N
  22.        viewportheight = document.documentElement.clientHeight
    9 G- M5 t. s7 H; O6 ]5 u
  23. }
    ; C( [. i, G$ T  d) f
  24. ! \5 F2 L; e; H6 }- n
  25. // older versions of IE
    ! [: r5 c/ S7 j, P6 y8 F0 Y7 i
  26. - l& f$ V' J) y/ y& S+ |+ i; l
  27. else( F. d$ c- |3 S( {& n# }% g
  28. {9 z' T8 b! v7 R* s0 m: H
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    6 s  M0 ]$ P! l* x* K  r
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight, k: z. Q, R1 w/ a  k7 H
  31. }0 p( X% c. G% _& C+ r8 K
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    - t$ A4 y" i3 O0 C, [
  33. //-->% \- B# l( b# }5 K' p6 o: {
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
. _' x+ b9 E5 ]/ s  {   O& e0 b7 W. e- r

7 f' I9 h; N6 O4 _* ~& t3 J靘皞:
Get viewport size (width and height) with javascript
# I- \- `+ m" X' }  [6 \
: f" q! `; Y. y$ r. W' Y
# P+ g: G* V* d9 R% Q

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-2-12 20:00 , Processed in 0.068700 second(s), 18 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵