52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 ' X1 H3 |0 C0 f" R

/ ^2 O9 O; Q0 U: T# ~8 A% n餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具  g* T% @' B: j0 M6 y6 ?. M
  1. <script type="text/javascript">
    0 [) X8 V- a7 d' S
  2. <!--
    0 \$ C5 w. e! c( V% C9 ]4 K# {9 n
  3. ( g, c! u" _, s9 i; w7 r9 X
  4. var viewportwidth;+ z) k/ I' i, j6 W
  5. var viewportheight;
    ) S6 d* U( H$ k4 _9 d+ N- B
  6. ( }# D% j) L3 i/ S$ e1 ]
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    & t$ T) {4 ]$ j+ O

  8. 8 E+ x* s3 ?4 }, i
  9. if (typeof window.innerWidth != 'undefined')
    ) ]( L7 `* \% [! v# g
  10. {
      u) _' {; k; q5 r
  11.       viewportwidth = window.innerWidth," j1 ]% W+ P3 y
  12.       viewportheight = window.innerHeight4 F" J& G" h& ], W% Z, U1 D
  13. }) K9 |; {1 ~$ U; a# D+ }
  14. + d& h/ D6 x: Q. Q0 g  `
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    * ]; C3 }/ ?' T- j
  16. 1 M; x: p& V/ L
  17. else if (typeof document.documentElement != 'undefined', H2 G9 c2 C; w7 F$ P4 W# |- ~
  18.      && typeof document.documentElement.clientWidth !=
    & R8 P. w/ H- `1 l
  19.      'undefined' && document.documentElement.clientWidth != 0)6 R6 i* K$ n3 E$ _) j+ y
  20. {3 D) e9 F  G1 t0 S
  21.        viewportwidth = document.documentElement.clientWidth,
    5 e# s# `! F% w; h2 ]
  22.        viewportheight = document.documentElement.clientHeight
    $ y! L7 A& g; _
  23. }
    : H7 m' Z7 ~# ^/ ?& N  D3 h/ X0 T) }

  24. # O2 g6 Q5 ?1 N2 T2 H$ H+ @
  25. // older versions of IE
    % y& m+ p+ a3 X# c0 q
  26. 7 Z$ i0 A, H. W2 r
  27. else0 T' J3 P6 m) d3 u& B
  28. {
    7 ~3 Y9 }' X. T9 d3 d" U
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,: {4 V, F: {. N
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight+ {3 y1 v3 I4 |) R: F4 R
  31. }( C$ J' X! y0 x' L4 L0 ]- J, d
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');+ k, \8 }. }4 V0 G
  33. //-->
    # g8 _+ I9 G* I) l* k6 R
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯- l+ ]+ O1 O/ ^4 A
4 C7 l( Q2 A# K1 Z2 L6 a. M
% B) u) h/ m8 ?$ f! r5 `
靘皞:
Get viewport size (width and height) with javascript
: I1 h+ n. f& [* ]5 C' }

/ A$ x1 ?8 x4 h; X2 X3 M5 ]
  z2 j: @9 A6 w+ Y+ m5 N' x

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-29 22:31 , Processed in 0.078682 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵