52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 4 }  F" w: a3 L& {* z4 S
9 j! x  j4 X+ x" M* {
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具0 K, X) r6 R: ^4 v
  1. <script type="text/javascript">! z' f8 J) k  J# S# s2 x- q+ c
  2. <!--% Y% N; v! G2 u7 M; L# {
  3. * U9 M. K$ ^# `0 f( [
  4. var viewportwidth;
    ; }2 s6 Q6 V9 l3 |. |# P$ m
  5. var viewportheight;
    2 m3 g2 ]1 T$ q) K( U; H( m9 d

  6. 2 l5 t8 D  I! v1 b; S: b
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    . m) o) O/ D7 K
  8. 9 D. x/ ]% a+ U, ^
  9. if (typeof window.innerWidth != 'undefined')4 z4 F& r/ w! b
  10. {: X8 u" s2 l* Q$ a
  11.       viewportwidth = window.innerWidth,! `( b- j' c* ]" d
  12.       viewportheight = window.innerHeight
    6 g. U3 y5 U& t
  13. }4 H2 R7 a% k* q( B

  14. ! g8 _; {3 f' K8 E. G. I4 o) i
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    8 _" u. x9 X/ v! K% H! @+ ?

  16. 0 @- j1 m) ~& |/ b& d% P
  17. else if (typeof document.documentElement != 'undefined'
    ) M( x" @! @8 M8 t8 }
  18.      && typeof document.documentElement.clientWidth !=8 @  w" N9 m: F# d( F
  19.      'undefined' && document.documentElement.clientWidth != 0)* S8 y, N  H% G# l! j
  20. {
    ) r$ B% V" F  N
  21.        viewportwidth = document.documentElement.clientWidth,/ e( t. F9 F; ]8 ~  a
  22.        viewportheight = document.documentElement.clientHeight
    8 Q, I" p9 i) B5 [" Y1 |+ f/ h
  23. }
    7 F( @6 m4 T" y
  24. . u  F( ]) f  Y, J6 R
  25. // older versions of IE7 Z: P# A5 C3 ?/ d; X8 m4 Z
  26.   W5 {' H( v# N5 Q# g9 X9 H: A& x: _
  27. else
    7 Q8 S. w+ ^8 {+ S, V; M5 v! K
  28. {; T5 j6 x$ ~" X5 R) h* Z
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    " _7 d/ n5 a. W. g2 ^5 F$ s. N
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight0 ~$ I1 L4 m  {* N" c& P& s  F* B
  31. }
    % z$ y2 V& d* g$ j9 U. ?
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');" v7 c+ s4 W/ V" B" G
  33. //-->
    ; V* D8 Y% G( ~+ d
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
$ f3 B  B: E- r2 M5 Y
8 X% S7 p/ C; I0 m# c
$ E& a5 ?" ^. O+ |
靘皞:
Get viewport size (width and height) with javascript
# P! e6 o, a, B4 g0 b! E4 {

/ T9 V6 D# l1 L& R2 U- x
8 ^& ~0 @2 v4 g

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-12-5 23:26 , Processed in 0.068401 second(s), 19 queries .

蝯∠.撱

[email protected] | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵