52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
. I1 y/ e9 y( }$ v% L3 Y
" |5 z1 p: Q3 }8 ^2 W. \9 h餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
! T) v6 L' Z' f7 H# Q2 p4 a* {
  1. <script type="text/javascript">
    / x& E' \& O- L, C$ F! u3 _
  2. <!--# W6 Z; @0 b6 x- X: U; N; q2 G

  3.   _3 t! r4 J+ Z9 y
  4. var viewportwidth;7 p: o. c( C" u& n5 n6 G: _
  5. var viewportheight;
    # ^4 j2 f+ `5 e3 O8 M. S5 l! ~) `

  6. ) V( A7 v  @1 J4 j! G1 T
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    9 w  j1 s5 s- w2 ^% k8 V' D! f
  8. # i, K4 K4 y5 @9 j# P! E% Y
  9. if (typeof window.innerWidth != 'undefined')3 m1 {' z0 Z$ w
  10. {
    * u1 n) D6 ]; w0 w( W+ ]
  11.       viewportwidth = window.innerWidth,
    / _; F9 f0 Q7 {- I
  12.       viewportheight = window.innerHeight
    4 Z# b+ ~: R" C4 t, S8 x2 D
  13. }
    : `$ d- O0 ]2 C5 D* H
  14. ( s% N/ v7 o8 w9 j7 u, `
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    ( P! n3 X/ e: s$ M* p
  16. ! O" y+ u# n& r9 S/ U1 j
  17. else if (typeof document.documentElement != 'undefined'
    0 P" n- s; x9 p- r
  18.      && typeof document.documentElement.clientWidth !=+ U! }6 a  W; i* m' V& R7 F6 B/ f
  19.      'undefined' && document.documentElement.clientWidth != 0)
    0 q0 w, l  G5 P. j
  20. {& ?7 l5 l; S& v% t* |0 D  w& U
  21.        viewportwidth = document.documentElement.clientWidth,
    & p. A8 C$ K2 ]3 ?+ R. M
  22.        viewportheight = document.documentElement.clientHeight
    : Z1 N2 T+ N. P& _
  23. }7 O9 c+ h" R8 ]) y& J+ o
  24. - M+ A0 S9 `9 r  J1 A( Z- \$ p
  25. // older versions of IE
    : j; t8 S  ^2 C; v- F5 z
  26. , s" O, W) G1 x4 ]8 C' |
  27. else
    # r* A; h2 _6 u% l
  28. {5 Z& E; _) A6 s1 u
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    : {, ?  T$ e4 W1 Y6 r4 C
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight; c5 X, i, o# L: C. r- `2 M1 C6 J: i
  31. }
    , F# {% A4 w4 X* @) F! t
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    - a& I7 o( {( |: R
  33. //-->7 r0 I% C5 N$ Q. l
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯- t. D5 _7 J7 f6 N5 D0 u
, J5 C+ i) }, a2 S# ?) a

% @, O* C) f( L) I* t靘皞:
Get viewport size (width and height) with javascript
5 _- D# P+ A: T- q# B% Y
, H( |. x4 R. F% B2 b# e
% a$ e9 ~( j5 G( k& W: M

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-2-12 10:29 , Processed in 0.078831 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵