52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
: ^3 w5 y0 ^! Z' u7 Z- g2 b. D! e( L* P2 T) Y0 F6 x
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具  G  n5 G* w# [- j& G7 w
  1. <script type="text/javascript"># B+ w" E# |# _# V  l  R
  2. <!--5 `% @4 x4 `* ]( E/ p7 p- U
  3.   E/ a6 l/ s9 w! I- v" y8 g
  4. var viewportwidth;. S( _8 `1 ~. P; [! h3 n8 ~
  5. var viewportheight;
    5 n+ A( ]* x1 z

  6. ) n! e4 _3 o( x/ x. K" P
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    1 r  B' i5 ?( Y3 H' ?
  8. 2 {) r/ l, [: U; Z$ d
  9. if (typeof window.innerWidth != 'undefined')' q! Y3 m. s& }0 G& v
  10. {  F$ x$ U/ q2 }$ a$ s9 q7 X
  11.       viewportwidth = window.innerWidth,
    7 e) e" z) f. g9 y! T6 y) G
  12.       viewportheight = window.innerHeight% x- G' m! l8 R  M  D6 O& X
  13. }
    ) K* o+ Y3 B6 W4 I

  14. & B; L) C  h6 p$ F' B! M
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)8 J* g  s$ L) v; j2 N8 ?) {7 }  }4 y! o

  16. 4 ?* j& r) j* @- B4 R
  17. else if (typeof document.documentElement != 'undefined'! H8 d5 _) R& q2 L0 m( Q5 C; |
  18.      && typeof document.documentElement.clientWidth !=
    : \$ D8 A1 K3 a8 t: N9 m! j, `
  19.      'undefined' && document.documentElement.clientWidth != 0)
    & x* D5 _* o/ a$ `7 m. n
  20. {3 F1 c. b8 p- Y4 q2 ]
  21.        viewportwidth = document.documentElement.clientWidth,
    1 V( Z, A1 t! F! L8 o" ]$ P8 n
  22.        viewportheight = document.documentElement.clientHeight) b3 o; Z$ m; J' l6 {8 s
  23. }
    2 c" ], {8 c; M  Y$ b3 k" ^

  24. - ~2 b+ i$ m7 k- R; @  u0 ]
  25. // older versions of IE& r/ J/ s3 H" i+ i, k$ W* m

  26. $ P' P0 N9 b! U% c! `
  27. else
    . ?! n# K$ B5 m/ E+ k
  28. {; A7 R6 {. ?. x" i! Q
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,' \- @! G3 w7 x- ^" r. V2 \
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    . l) [5 j: p& ]# d. t; U
  31. }+ F. q" J- _7 e
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');* z7 h8 ?* ^' t% X
  33. //-->( N6 v- Z2 s4 u$ _  a
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯* M! K  e  b: f5 F; ]1 X/ F# l& _

: Y9 H7 A7 m& q2 Y/ g! l

8 |8 S5 D- f5 M靘皞:
Get viewport size (width and height) with javascript
0 G; t/ ?  l2 [5 T! b
; k; O' ]0 K; f+ O+ x

  o! ~' o4 c" D5 f

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-2 00:28 , Processed in 0.092423 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵