52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |甇摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 % H% m; L. f* p9 G1 |
' ~0 {3 }* T: H3 Z
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
: e% o: m/ U( ?  L, }/ f* U; g/ ?
  1. <script type="text/javascript">7 m" r+ Q$ K, Q' R4 [/ e
  2. <!--
    ; K# T4 O9 r3 P* B, U* I% Z

  3. . U3 P! T- Q  J# i
  4. var viewportwidth;0 @1 Z9 z* i& u# N$ W
  5. var viewportheight;5 Z- I- t6 _9 E# ~+ u
  6. : U) F; K; B% j. L6 t- w
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight; K2 R" D) m5 ]3 E

  8. - N& O, f6 m# g8 U- g
  9. if (typeof window.innerWidth != 'undefined')
    8 y1 N: b& c2 e$ v+ P4 T
  10. {' m# K7 I/ Q0 f* }' a. s
  11.       viewportwidth = window.innerWidth,# i% y7 L7 x! L! v
  12.       viewportheight = window.innerHeight8 r4 n6 Y! X% Q2 u3 F7 F- P- s
  13. }; |" H+ {6 C$ I) E& O# k3 l( \3 I" `
  14. 0 Q" l9 k. y" [1 q1 R: E
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document). a. o1 B% y* C; C0 ?6 x. x5 E

  16. ) T  `3 S, M, o* i
  17. else if (typeof document.documentElement != 'undefined'
    9 C+ O: i0 _% Z- Q5 F
  18.      && typeof document.documentElement.clientWidth !=1 f$ q$ q4 ?0 O/ w) C9 n
  19.      'undefined' && document.documentElement.clientWidth != 0)
    / T' D2 S$ J% [. x
  20. {
    2 v' u, D% `0 g( J
  21.        viewportwidth = document.documentElement.clientWidth,
    / t! ?! G; {6 T& j) ~, \
  22.        viewportheight = document.documentElement.clientHeight; W( q- X2 C: u: U
  23. }
    ! A! @: V  Y+ A6 R0 ^6 G
  24. 9 [! Q+ Q5 I8 A8 t4 @
  25. // older versions of IE
    7 E% ^( U" b* S. ?

  26. & y: K& N$ S& F6 I2 R8 O4 f
  27. else1 G7 Q, p- l* D5 d* p5 P
  28. {
      m1 N( R1 y, f! v8 n, t' J2 k
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,+ t: V; I' K: e6 e, X
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    8 {; e/ c7 ?, ^/ y# e
  31. }8 D+ S! z+ n  `" v3 ?1 O
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    * @3 @$ Q, X* y5 v% `( u
  33. //-->4 a/ E. o. k  t/ b  g4 O
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯* W9 F5 F8 _2 t, y

2 m1 Z' W1 y1 z' G5 c

3 O7 ~; H# p% g# E* m' \靘皞:
Get viewport size (width and height) with javascript
) K$ M" F/ _0 p& E0 J2 B' t

3 A1 e4 \2 y, R0 W+ Y) W1 |

) l3 l( i0 X1 n

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-2-11 20:49 , Processed in 0.077142 second(s), 20 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵