52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
' ?1 c! [; w0 o1 G' N+ w9 B" I( h0 X7 Q6 a+ r* ?3 H# ?0 Z* O4 D
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具3 l, Q! R! K. E9 _- w
  1. <script type="text/javascript">
      p5 _- q" p7 u' e6 `6 ~; H
  2. <!--' a) b/ m6 l7 v. Z# G

  3. , m, x1 v; c/ v3 h$ t
  4. var viewportwidth;7 l+ Q: F  C  T6 @. u4 A( s  T
  5. var viewportheight;
    , t4 y: g9 P6 |7 s! Y! Q& C

  6.   U# i- j& b9 Z" H
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight6 P( z, k4 n9 E& R1 i, }, X( ?
  8. 8 q2 n7 ]+ s1 |1 W) P$ D
  9. if (typeof window.innerWidth != 'undefined')
    6 f6 @$ e- H! M! m/ _; q/ \
  10. {
    5 g& I/ M! |. l: d2 z# g: l
  11.       viewportwidth = window.innerWidth,- B6 ?( m; o, q3 T% E2 B: e/ f5 k; y
  12.       viewportheight = window.innerHeight6 v' M+ Y) @% A0 h
  13. }6 w' c' U$ a( @3 _
  14. ) Z/ B$ g% o" c" @! k
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)6 v+ t2 {& [' D  \) X

  16. # e' r% G/ k( d: z
  17. else if (typeof document.documentElement != 'undefined'- s0 Z2 H: V/ R) _) z
  18.      && typeof document.documentElement.clientWidth !=
      U6 l8 M$ p$ C+ Z% J  p1 }# o7 S1 d
  19.      'undefined' && document.documentElement.clientWidth != 0)5 V7 Y; o3 H6 j
  20. {
    + W  H! j9 O  ?% t% J7 ^* K* X
  21.        viewportwidth = document.documentElement.clientWidth,
    1 Y; k) J: b- R" Z6 X- R+ u2 o3 k7 `" n
  22.        viewportheight = document.documentElement.clientHeight
    5 N9 V/ S9 Z) d1 c! G
  23. }2 S% C4 ~' S1 v( y( T* s" }4 p
  24. 5 g! k, I5 a9 @3 O, n
  25. // older versions of IE* W; V' ?5 m+ }, v# ~4 |: b
  26.   U3 f$ \% U3 Y
  27. else0 o5 g3 \9 t* [. R8 ?
  28. {
    3 _$ T* ]2 L2 k7 ?
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth," C; \' E1 `- A# ]# p! p% t5 n3 p
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight1 q' i2 ^" N9 N; @; h& Q& H
  31. }7 o) i& P% I; T$ b6 F
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');1 Q) v4 a! h7 j5 v) @4 h& x0 F
  33. //-->0 t) P/ q7 @+ T/ p% T
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
1 H2 K# T0 q# x; h2 W' r, X$ @
5 |6 k+ T. C: x! n/ ~* _
4 z0 H" @% ^8 `3 c
靘皞:
Get viewport size (width and height) with javascript
" M5 B0 q4 m7 {, s! t' T

4 W! _+ e# y: e* _% k+ `1 ~
, A6 E8 Z; U' q" [0 o$ E

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-22 13:47 , Processed in 0.073299 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵