52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 - H4 j# }4 h3 c  v+ K: u$ y

5 F3 w' Q: ?2 {8 _' `餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
7 P3 k- n# P: ^, i7 X3 N
  1. <script type="text/javascript">
    $ _1 ]0 `7 \* A- w' T* F4 M
  2. <!--) V% n1 y# R. O% W$ A6 v

  3. * w+ E6 v# f' w6 a* m  @
  4. var viewportwidth;
    " j3 U1 [  [/ B
  5. var viewportheight;
    % F2 d8 P3 [: i7 q! P" Z7 A
  6.   Y* \5 N% @% `" y8 s% f& i
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    7 D: w2 G# s( X( o* T
  8. # }$ A4 A$ x2 t" C% r. ]5 k
  9. if (typeof window.innerWidth != 'undefined')
    , p7 k+ x( ~8 ^% J: H
  10. {
    ) k8 o' z: K& p: R3 P3 y
  11.       viewportwidth = window.innerWidth,
    # C1 h7 h7 o& Z: H
  12.       viewportheight = window.innerHeight+ b  {0 t% b9 A3 m
  13. }3 H: ^* g8 N7 g3 O7 ^) Z

  14. 5 ]  T! P: Y/ b8 P
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)* P! a* {6 @" `% ?& Q9 G% b6 l

  16. 5 N8 S/ o+ F9 S9 V! h. E
  17. else if (typeof document.documentElement != 'undefined'
    ! T9 f) L2 ?' Q$ G5 w) s
  18.      && typeof document.documentElement.clientWidth !=
    . s0 P' N( n0 K
  19.      'undefined' && document.documentElement.clientWidth != 0)
    9 h& F1 A% @* [6 @6 U( H& Q
  20. {
    3 b9 B4 V/ A8 f. K4 S. j1 z. \2 K2 w
  21.        viewportwidth = document.documentElement.clientWidth,
    ' ?  {0 W. _6 r; o1 s- _- e) r7 S
  22.        viewportheight = document.documentElement.clientHeight
    / _/ j, H) D% Q" v' m
  23. }
    7 V, z& ~& n4 E4 a+ I! t- C: c
  24. : @7 ^7 r, _% F% v5 f0 Z8 F8 s
  25. // older versions of IE
    ' \& y7 T% _7 I# F$ \! E( w' Q
  26. ) G0 ~# G6 _' H8 c/ y5 C
  27. else: z" r0 w* t! y9 [4 o' j$ w
  28. {+ R  s. B9 S: n/ l/ A
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,/ W8 G, D, A/ E
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    ) ^( k5 D" [  h4 v4 X, a. I
  31. }
    0 D1 p1 r" X" ~% }* r
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    6 z1 v6 ~  u" J7 N8 t
  33. //-->* P9 t3 s& R/ p; h! L
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯, w9 F/ |7 z4 V( D3 R

% s* S% y+ o9 ]4 e8 M* s6 h0 r1 N

4 E0 ]$ l5 x" S- D靘皞:
Get viewport size (width and height) with javascript
2 _; `# @! U7 M, u  N; Y
& ~5 t: c; @9 S6 z4 P) s

9 b$ Y. }3 T: D# C* a

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

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

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵