52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
/ y0 p" T' @5 U! r# q, y& x' a; N: X" _
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具, \% R: Q) {$ a, c2 M3 h% ^
  1. <script type="text/javascript">
    4 s& ?# m+ S8 J/ [; D# x
  2. <!--( `+ v4 U; I0 h- Q. Z" C( f

  3. 8 B) `& k- t5 X) v* l0 D! z
  4. var viewportwidth;; Z- @" W9 P9 p" ~/ r3 z
  5. var viewportheight;
      B. P4 ?5 |% b" r2 n! @! [

  6. ! z+ i1 r2 }6 `2 T$ d- u; M6 q
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight+ E: b; M+ {3 h6 `& U
  8. / b3 h4 |: |& ~$ N% W
  9. if (typeof window.innerWidth != 'undefined')
    9 a7 C3 m' f; k* s: b. J
  10. {- \1 R0 x$ Y8 D
  11.       viewportwidth = window.innerWidth,
    ( C5 x! r. P3 O( ?/ _4 Q2 K
  12.       viewportheight = window.innerHeight
    % p% u* g/ q; ~- `
  13. }, R5 b. N8 C" {, m7 Q' p. Y/ w; c  y
  14. , \5 u0 L4 z$ e) j
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
      y2 k# h* K4 |# c; f( H3 `# P

  16. / C: P0 M/ b# Z1 X
  17. else if (typeof document.documentElement != 'undefined'
    $ l. L2 i0 F* S2 G5 o6 v8 i
  18.      && typeof document.documentElement.clientWidth !=$ S3 v9 Q  }& g
  19.      'undefined' && document.documentElement.clientWidth != 0)  m8 W* M5 X" s. g) S
  20. {
    % ]: N, z  z# d3 m2 B+ u: j4 c
  21.        viewportwidth = document.documentElement.clientWidth,
    7 p& C8 h* ]; y, \$ E! a
  22.        viewportheight = document.documentElement.clientHeight$ o8 u. X- y1 w/ W
  23. }
    1 c. M- ^/ u% f- L  T1 A4 @4 c
  24. 4 F4 M0 h0 |" s1 C; A& E3 d
  25. // older versions of IE
    3 r% P: B# l& |& ^) R$ ^
  26. 0 b# M3 H6 z: q7 W
  27. else, e; M3 @  ?3 K: \
  28. {
    4 w* B8 [3 o9 M8 u
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    + e& L9 K2 w; ^, a
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    + ^; Z. f) |3 m, {5 m2 X
  31. }4 w1 L8 d' U9 i' E5 s
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    7 [4 M; m" G4 y4 d, V0 G
  33. //-->2 X% D7 v9 c0 q4 j
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯" h- Q& p$ w" E  h% a
) `' ^9 K7 ]( G( M9 E
7 J/ D- U6 D8 y3 w% |
靘皞:
Get viewport size (width and height) with javascript
% O0 ^" J8 X) e6 x0 l
8 ~  B% O0 _+ v, s$ d( e& p
/ U, i# `2 V; v) u# p' _

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-21 23:28 , Processed in 0.085261 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵