52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |甇摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 0 c8 m5 _) o! a! c9 R; A
5 L8 A4 O3 g  E3 K+ s7 `+ j# F
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具( t" X7 ]) e1 F- n' m& o- N. S- f
  1. <script type="text/javascript">
    9 d) h1 I8 e) t2 g8 a3 C" M
  2. <!--
    4 \/ a6 f( K* q  q

  3. + W8 G& I7 u0 N, W" t
  4. var viewportwidth;1 @1 _: X& |" H% R2 F+ X) |
  5. var viewportheight;/ B: b9 N& o6 c

  6. & Y* ^& Y4 i1 E1 R
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    ) g( j8 @$ H4 d9 I0 A
  8. # E% e! ~+ r8 c' r0 g& O" _
  9. if (typeof window.innerWidth != 'undefined')
    1 H) i7 L. a# R7 n
  10. {. f4 O5 ~. }6 {
  11.       viewportwidth = window.innerWidth,& y4 Q8 P6 M! t: |) q6 o# D
  12.       viewportheight = window.innerHeight
    2 S% T" G1 m" s( J
  13. }
    9 L) ]" z& [- Z+ l+ _. N0 r3 ~
  14. ( V/ ?2 S5 X; _: _) r2 ]
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    9 f! P9 |1 P/ ]) t
  16. ) z) U, h* n6 E+ v3 B- F! {
  17. else if (typeof document.documentElement != 'undefined'
    3 L5 J9 X  L' W
  18.      && typeof document.documentElement.clientWidth !=
    1 W! l' F2 ?% ]$ u/ c8 x: g9 Q
  19.      'undefined' && document.documentElement.clientWidth != 0)
    9 v) Q5 R" ]; h5 J$ P) F1 N: b" {& T
  20. {
    . s$ a2 E" m1 v
  21.        viewportwidth = document.documentElement.clientWidth,+ U: H0 d" L% o) @4 z
  22.        viewportheight = document.documentElement.clientHeight
    , c6 K2 b: D! L
  23. }
    % k) b0 q/ [4 ^$ ^- `
  24.   N- E5 ?0 s2 P- q% ]7 {
  25. // older versions of IE9 ]" e. Z! J, o9 D
  26. $ A1 R+ N, v& A  o" p
  27. else& I+ c+ b: j! v6 o4 \' ^2 m9 y+ g
  28. {
    . |8 \* ?' b% O( U5 f/ C" |
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,3 u7 g6 N+ ?& L2 z/ w
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    5 b8 V  |  {0 u  I% R$ F# o
  31. }+ F/ k! ^$ T( P) @7 u3 _
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');7 m4 N1 w+ M6 z  Z$ I
  33. //-->
    - z' ], V8 i# K, c: V6 [
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
* |6 y0 x$ r2 p & v1 @2 \9 S/ F$ Z& a( s

: y0 J8 d! N' E9 t靘皞:
Get viewport size (width and height) with javascript
* ?. a: ?' ]. J6 t
2 j- S& \, _. }3 _5 w/ m5 i
3 `) L: A! S8 g2 Y

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-2 09:57 , Processed in 0.073420 second(s), 20 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵