52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 8 l7 O+ y# E% l( k4 D! a  h

7 T' j* u. g7 p8 @% n6 W4 G7 L) T- P' i餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
6 i: c1 u8 [- D# |
  1. <script type="text/javascript">( S! O3 K# Y* @% ]
  2. <!--# C' l" ~5 Y! P$ f% p. m- a" M
  3.   u3 l& F& j) U' T
  4. var viewportwidth;! |, d+ G. v* w, O# Z/ l
  5. var viewportheight;" Z& x; a3 B& |$ F4 P: V% n

  6. - D8 p% c1 p8 `5 U/ [$ k
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    ( n# [4 Y: j* j$ x

  8. ; c" t; Q0 q% B# h
  9. if (typeof window.innerWidth != 'undefined'); b) c# U3 N# g& W: t+ Q
  10. {
    - G+ _; V4 V& w& Q7 k& \
  11.       viewportwidth = window.innerWidth,
    9 c! D7 p8 Q( {4 J. K% ]
  12.       viewportheight = window.innerHeight9 F, s$ P. j  ]1 D# D
  13. }
    . p) u8 g! n8 T3 U6 [6 o" r! u
  14. , U% \' {* I4 _( G* U2 q8 `
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document), k* E8 t& z+ @! x: q

  16. ( @& H" J5 s9 N2 F& t/ T- A1 |; W( t4 y
  17. else if (typeof document.documentElement != 'undefined'2 f/ V$ W; r4 `# u2 J
  18.      && typeof document.documentElement.clientWidth !=
    0 f9 {( a. p, b6 L( _
  19.      'undefined' && document.documentElement.clientWidth != 0)
    + F' N$ P/ R7 S1 J  b& I
  20. {
    5 s4 |" m: Y" X6 N0 K, m2 w3 T, E
  21.        viewportwidth = document.documentElement.clientWidth,
    8 z3 Z" a3 c! B$ ]9 m6 D2 x
  22.        viewportheight = document.documentElement.clientHeight
    ! j; {; C6 a1 b0 o! [7 h6 Y
  23. }
    - L* e2 x3 N0 m( a

  24. 9 h& \2 |, f/ [1 k; |1 Q0 Y& \
  25. // older versions of IE
    3 @4 e. O, K/ S5 \$ d4 O

  26. ! V3 d  Y4 h1 b* F# z7 F' q( f
  27. else7 a' k" q% p  S  w! o
  28. {( K) M( `, g& m
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,% F  ^. s) ~5 i6 V
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    & m* u$ R. W% H- N: K' W( X. y
  31. }/ D3 s- Q5 d6 Q3 k
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');2 _; @+ A$ y& x' L+ h, {' O7 b1 h
  33. //-->
      y0 {4 T& g$ |: \
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
  m' N7 W: m6 U8 w( z% B6 J' e
. A$ G3 n# ?! S* p" ]5 P4 a1 }% E
8 o1 [$ J% b8 A& q
靘皞:
Get viewport size (width and height) with javascript

( W! z$ m- E: _$ v4 v, @
; K# r' U: r8 u& E! @' {2 m. P

9 `4 x0 N+ [. }5 A; c1 q

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-12-26 16:13 , Processed in 0.057833 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵