52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |甇摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
7 X8 U! n5 s( J" z# v- X  p- J$ I
1 p* a2 Z$ ?7 L餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
. Q9 q# r" b" P
  1. <script type="text/javascript">& p2 ^7 J& N5 B7 x  R+ Y% q/ Z7 O
  2. <!--6 _. y. L: i+ g# Q3 b) h" o
  3. ! k. `2 S- q7 M* S2 {
  4. var viewportwidth;! X2 S. U" o, U1 T' k
  5. var viewportheight;
      {* b; v3 q: r! l% q
  6. . p4 O; V3 |, u& F, e" p! t5 y
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    6 X8 ^: e+ U+ {6 f& y9 o: o
  8. 3 s. i) ^% y0 C3 \* M
  9. if (typeof window.innerWidth != 'undefined'); \) y  e" S' a! ]
  10. {  ^' j; u" w% ~, [3 w1 r5 U
  11.       viewportwidth = window.innerWidth,
    8 e4 B. p! ^3 _. j7 \& f! K
  12.       viewportheight = window.innerHeight
    ) U- m5 F+ d( w. F1 I7 N& V/ Z7 e6 ^
  13. }6 N* U# C8 C1 N- J7 ]

  14. " a( r9 K$ O5 ^9 h7 q3 [
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)8 i8 g% I: P) d! _- R- S! c- Y. E" J
  16. ' q% r1 g* u6 [* O/ T1 X4 H
  17. else if (typeof document.documentElement != 'undefined'* v# z' ~$ F5 B/ u+ w
  18.      && typeof document.documentElement.clientWidth !=7 P, Q: M5 T7 ^" f- k
  19.      'undefined' && document.documentElement.clientWidth != 0), F7 m; W# v8 j( k# C( Z
  20. {
    & [& V' X" u" J8 ]- w4 @
  21.        viewportwidth = document.documentElement.clientWidth,# e) ?! z; b4 A
  22.        viewportheight = document.documentElement.clientHeight
    : W/ e' D$ s0 |/ a, b9 e) J4 J# d
  23. }
    ( d+ t0 L4 J6 s0 n. U% ~/ c/ b

  24. 2 ~+ W. W0 s' j! @
  25. // older versions of IE1 M% C" L8 y8 x+ _6 z6 a  x
  26. , E0 b/ X8 A3 b$ f/ N
  27. else3 t( X5 z$ B# v% ?' `4 N5 P8 e0 c
  28. {2 Q6 u' _7 |9 ^& j: m' o
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    1 R5 B0 p( g0 Q4 R+ I% r
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    1 t5 E0 f+ a$ x
  31. }- S- T# m7 U3 m+ H+ g' @
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    + V0 @& ^  y8 w/ K' F
  33. //-->$ T& w; b1 Y. T) \
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯6 V  B6 r( h6 B) A: \- I6 i" y# g
6 }. G- g$ [) J
  X  a: G# |, K1 ?, t2 P3 n
靘皞:
Get viewport size (width and height) with javascript
2 @6 n  f) X9 x; J7 }
, H( O) t8 [& j! q! d8 p9 \
7 C8 k- U2 e1 @3 m4 g& h

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-2-11 04:45 , Processed in 0.069355 second(s), 20 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵