52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 4 j: t  E$ Y) C& w$ @
7 s, p( ?. M; |7 H6 o% N" ?* v
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
1 h% w2 F4 J1 ?2 i6 _
  1. <script type="text/javascript">
    ; |' w: ?3 o2 I' ]# C5 r
  2. <!--
    - G* J* v3 X2 Q  M. Z+ _! n
  3. + e$ k3 \2 t( p
  4. var viewportwidth;% P0 m6 [3 g4 m0 q) D
  5. var viewportheight;( V( [' @" t8 a, J

  6. 2 v+ A8 {8 N* b" W/ K
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    " g; P2 G' f' }9 h1 r4 y
  8. ( ^1 ~9 }6 w3 [/ n8 G5 p
  9. if (typeof window.innerWidth != 'undefined')
    " `* R; T  d  X% c) G
  10. {
    + K4 y6 k4 X: f
  11.       viewportwidth = window.innerWidth,; Y+ f; z7 C7 C: O( I
  12.       viewportheight = window.innerHeight
    9 n$ ?8 V4 A! I% M+ b8 c
  13. }/ S, A- g' A- g0 E7 O2 U

  14. ! Y0 N2 c$ b4 E
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)+ G% _7 ]! _6 ?3 u9 r; c

  16. 6 G! |  a4 ^( s' y
  17. else if (typeof document.documentElement != 'undefined'
    ; G+ n  Q) ^9 b  n/ I6 L
  18.      && typeof document.documentElement.clientWidth !=* C% ?. ~4 E6 H# K$ o2 K' G
  19.      'undefined' && document.documentElement.clientWidth != 0)
    5 G" Q. R8 W1 C
  20. {
    & `7 ~1 O  B) m+ S3 m
  21.        viewportwidth = document.documentElement.clientWidth,5 I: i; ?, S2 N' f+ `/ ?4 U
  22.        viewportheight = document.documentElement.clientHeight
    $ R8 J1 \8 ~  e5 e& x) ]1 M% Z
  23. }
    + ]% J5 O# O8 e, R5 O+ `

  24. ! X9 E4 b! }3 {& s% r4 j
  25. // older versions of IE  c! |9 N# @/ ?' A: |* }/ R" v  Y8 ~
  26. 9 `; |; P' [( a( O" y
  27. else
    / v" W/ R; i. D$ r% c
  28. {
    ; }# U6 t% x! S4 I$ x) T
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,/ r4 p5 [$ A6 v
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight! o6 G" q) ]) Q5 k* ^" z
  31. }; C* S' p% `+ h$ r
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    % C2 i5 a+ W. O$ K( m- F# Y$ Z/ j+ x
  33. //-->
    ' I7 I4 _$ B, i" o4 n; @5 s4 w
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
$ s7 j) }$ b* Q5 L, B' M
7 c1 f3 c* |' p. V8 Y( H9 I% T
  O2 X8 j; V, T5 H) F
靘皞:
Get viewport size (width and height) with javascript
( c( t- @+ {9 m! j4 p6 `
" v3 h7 K( d1 `) F! g/ n' Q
+ i$ C0 y( Q& N( E: {. b

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-1-28 05:14 , Processed in 0.073268 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵