52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
+ ^* A, T: _  X
/ s* G7 c  [" S; }# |5 @餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
7 v! S9 Y- K0 \8 m3 c! S
  1. <script type="text/javascript">
    ; P' ]6 ]) Z: y, m3 [. `' e4 Z' P
  2. <!--% ]& h* m- P  b: s. W1 x
  3. 0 d: D; o) j; g1 b: a3 i
  4. var viewportwidth;+ P7 D' `; |- G1 k. K/ v/ M
  5. var viewportheight;% H! j/ q# t8 Q) D
  6. # j$ G8 f7 ]6 d: F) |. J
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    ! S0 T* e3 E: U5 E
  8. 0 _' b9 q6 M- \, \
  9. if (typeof window.innerWidth != 'undefined')7 x. I- p' I1 E, k
  10. {
    % ^9 v4 p/ g' E! u4 ], `
  11.       viewportwidth = window.innerWidth,' K5 K# |) A0 Z1 J* F
  12.       viewportheight = window.innerHeight
    4 F0 y4 h1 `+ f  s, V; Z
  13. }8 L7 Z. F) s% H2 O% p* ~
  14. : V' ^. E5 O1 w7 |, D
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document): m3 m% b2 h" n2 C3 f9 ?- x
  16. ; Y) L4 P: F2 q0 ^
  17. else if (typeof document.documentElement != 'undefined'
    ) }! `6 N- |% `9 ?- F5 _- p
  18.      && typeof document.documentElement.clientWidth !=
    . c( w& {: I2 {9 y) c+ e4 K
  19.      'undefined' && document.documentElement.clientWidth != 0)1 q% n. ]5 f5 k" n0 M; M1 q8 N
  20. {" T% @, I( C4 B. b; @
  21.        viewportwidth = document.documentElement.clientWidth,
    8 ^9 P3 Z+ u9 b' N1 Z  w: F- V+ _2 H
  22.        viewportheight = document.documentElement.clientHeight
    7 O' S# m- W, z8 ?& N1 A
  23. }
    8 s( z! U; r  u, L2 y/ _+ ^8 d

  24. 3 g& a, ~9 C- O2 t0 j" P
  25. // older versions of IE
    " F8 C8 H- ?' e$ H& r8 G
  26. / ^4 U1 G: R, ~
  27. else% D& `8 r- b! y
  28. {  o! Q" Q5 X) @
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    & }; k) y. N- l2 g( [
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    1 l2 h# ]$ B* i2 @
  31. }
    ; S5 d, p, _8 [- x$ A+ J
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    7 T7 p8 ~. h4 L% O( u, `- k
  33. //-->
    5 k5 i6 u# S: I, x/ t
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯/ @' }7 A/ f2 {9 t" j2 F
7 Y- Q$ E$ b/ L) S
3 |9 n$ o- m! K' S0 Y6 t: }
靘皞:
Get viewport size (width and height) with javascript

: V0 d7 i, Y& e/ R' V" r1 Q* c" c$ K4 G

! k$ X( g2 j7 w/ ~; X& U

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-29 12:34 , Processed in 0.076101 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵