52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 3 f: W& L% d3 x9 g' K
& y- c: j7 V* j) E5 N1 G
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具7 ?4 A- k3 w# _0 m4 y
  1. <script type="text/javascript">7 v/ g8 d. X1 A
  2. <!--
    ) B. `1 [4 D$ d0 b: D/ g" k( x( d
  3. ' G/ @% e' Y% Z7 W9 K$ ~& Q* E
  4. var viewportwidth;% h( V! A! N* m. ?1 J
  5. var viewportheight;
    , M& o0 w9 u  x0 S/ ~( w9 X

  6. , i# t6 g' y/ n0 e
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    . j$ Q  z4 E9 o4 I% |# U
  8. " b1 p7 Y7 P! H% I: V
  9. if (typeof window.innerWidth != 'undefined')0 R  V6 f. }8 Q
  10. {- a7 R7 j! H1 n- q; g& K+ X
  11.       viewportwidth = window.innerWidth,
    # i/ U7 l* r; q. l% l, N
  12.       viewportheight = window.innerHeight- n. d( Y  _' V6 B0 v% ^
  13. }
    - w& |$ d6 ?; T/ i- c5 H

  14. 1 J0 c- j& V. j( |9 k; ?1 [
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    ! i9 Y# s( e* ~# u' x$ V

  16. ! D: M! g8 W" I; V& Y, W( c
  17. else if (typeof document.documentElement != 'undefined'& T* K' u1 d# p# Q- _& ~
  18.      && typeof document.documentElement.clientWidth !=8 h* c0 N& C" @! C; B; G3 D
  19.      'undefined' && document.documentElement.clientWidth != 0)# r) F2 `3 P- s0 a+ V& A2 o
  20. {2 k) w$ d. a+ G
  21.        viewportwidth = document.documentElement.clientWidth,
    2 r. A# Q+ ~1 f) ]
  22.        viewportheight = document.documentElement.clientHeight1 F* F& O8 y/ w* d7 }' S
  23. }
    7 i+ _' t: H+ ^* M
  24. # S& O+ D% X; y4 X
  25. // older versions of IE
    : x( v# r" p- T7 o5 c% f
  26. ) u0 m3 n, Y( ^
  27. else
    & E/ P7 }5 r3 a. u1 C- U
  28. {) h3 r& {) n2 }  ~
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    ' a9 k4 k& ^7 O, G1 _& }
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight- r- |( K7 |) W( P* h
  31. }3 m5 N4 p+ t6 m. U4 X
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    / t: d9 O, x; B, y, u9 C+ p) e
  33. //-->
    , f% ~( t; ?1 b, E# }1 a
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
1 X; C* u- K4 n4 \
+ q' E; v2 D# f9 R# t. R+ F
2 N5 E' l6 S7 a+ G( R5 l; a! n
靘皞:
Get viewport size (width and height) with javascript

+ d8 X2 ~- U+ ?/ C% }6 b
& V6 s9 h6 h/ q3 o8 P) q6 T

, o/ j; J* B3 o) J

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-12-18 10:07 , Processed in 0.069058 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵