52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 # n1 I# M% n3 D; \0 [  N/ b
' i3 a& J  n4 v% U7 [; e
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具3 ], s1 f& Y" p6 J/ _- a
  1. <script type="text/javascript">
    ; ]: S; A% }$ q0 I, f$ Y
  2. <!--) |: z: u. w. o, Y7 ?& y* C
  3. , q% Y3 I3 z. q% R% G) ~& O
  4. var viewportwidth;7 U3 r8 C$ M2 q' T: ?7 b. u& X
  5. var viewportheight;( {- M* ~6 x; j% v

  6. * F% }: [) s. D2 e  G  L
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight5 @/ M2 f5 P( `% M

  8. ! S8 }* S+ d* p
  9. if (typeof window.innerWidth != 'undefined'); ]' }, S/ o& g7 Y& U+ S: G$ \( u
  10. {
    : j% I6 s0 R! _! }
  11.       viewportwidth = window.innerWidth,
    3 H. p! n% e* x$ W2 u
  12.       viewportheight = window.innerHeight- Z0 [" ^2 x( t* Q
  13. }- B1 [7 z. F) P; [( n& P- R2 O

  14. / }7 O/ F$ K( ^- N5 Y4 k
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    , `  w0 |: a9 m* c- z! _' ?5 Q
  16. 5 S/ N3 N; g% E
  17. else if (typeof document.documentElement != 'undefined'
    ' ^0 y. {. l1 j# b  x+ o
  18.      && typeof document.documentElement.clientWidth !=
    7 a$ p$ G: Z3 g7 g0 ~+ {
  19.      'undefined' && document.documentElement.clientWidth != 0)
    . c0 v( C; E  u$ A4 n
  20. {
    1 ?5 H" O. t5 P- I
  21.        viewportwidth = document.documentElement.clientWidth,, S1 o" O& S) K; H0 q
  22.        viewportheight = document.documentElement.clientHeight
    & _  D0 ]* c+ R' ^" }3 o0 i
  23. }
    : R* A: m/ \6 w4 b$ P4 T2 }
  24. " _1 D; ~+ h7 m; W" T9 G8 V
  25. // older versions of IE0 ~8 w* [& C& t) Z
  26. 1 S4 g& N  t# _$ i/ b9 R
  27. else& h$ M  Y* x% v+ g0 z
  28. {
    % D9 [# M* Q/ r7 [
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    # n, z% e& {; G9 |
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight: A* i# M* ~# h- A8 t: J
  31. }' a( m/ Y/ }& u. o7 T: M
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    % d4 ]' u" ~. S1 l6 H, d- Z6 h
  33. //-->& G: h- n* g" p2 g+ a2 O
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯, i7 _; m4 W1 ]9 m( ?3 [) d
- P5 f$ r* ]  A; g' O( ^/ r

9 h( ^; v6 C" I" w% [4 c靘皞:
Get viewport size (width and height) with javascript
+ _9 {/ L& f9 m8 n0 E! d* l

. ~- B  e' c$ @, M, k
' n7 P; @, v7 N2 G7 P( m" G2 L

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-22 08:04 , Processed in 0.060041 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵