52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
( n- s7 \3 Y' Q! R, w% b" q' D! E% G' S- v8 c) G
餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具0 f1 l: F) E0 @
  1. <script type="text/javascript">
    & b( C/ n4 m1 a0 t8 Q% a
  2. <!--
    2 Y( T$ n- K! T% q# b  x

  3. 4 [  j* N1 W3 S7 N# K. e9 C8 o
  4. var viewportwidth;
    # y% t; M  I$ z* _% [2 t, a- l: a
  5. var viewportheight;
    : s2 G, x% R5 P: I6 m! i$ l: x! d
  6. " M5 t9 g! Q2 I) ~) @
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    , H% B9 C# s3 Y8 ~  |

  8. + i+ w* X8 o5 K6 k0 _; k! x5 n
  9. if (typeof window.innerWidth != 'undefined')% _" U/ s4 O# n# i" N& P
  10. {% O( c% A% @7 A( e6 }# W6 Y# C
  11.       viewportwidth = window.innerWidth,8 o# k) v4 q& g" e* Z* `
  12.       viewportheight = window.innerHeight
    ) L9 k7 N0 R* f) Y; `
  13. }. N, N8 I+ L9 ?4 h$ N
  14. ; r7 O' f+ E: b. f' {  N0 G0 _
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    ( q9 j( a5 z" S. v7 }
  16. ' ]; s5 K; G: u7 S5 z
  17. else if (typeof document.documentElement != 'undefined'7 s3 ~  z& ~, q5 Q) D" M
  18.      && typeof document.documentElement.clientWidth !=
    ; L6 [" v: ~. b: X
  19.      'undefined' && document.documentElement.clientWidth != 0)  G! n$ B  F+ ?. K" K( B3 p
  20. {
    : ~0 G; u# _( H/ s
  21.        viewportwidth = document.documentElement.clientWidth,
    ! M/ z2 G5 Q9 I& `- ^) ]
  22.        viewportheight = document.documentElement.clientHeight0 A$ z9 L2 Y& d. ^: c$ k
  23. }
    2 L4 k0 R  @6 ]6 F1 m4 E8 W8 I

  24. ' r% F+ j( e0 d, J) n6 o
  25. // older versions of IE
    $ ]! g) n$ R0 D  V$ `2 Q

  26. 1 D1 T9 c* V  i* s' j
  27. else
    * [2 h$ s0 W0 z( P- |
  28. {
    " h; y7 v; |5 ?+ o9 o* q  k
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    , E  O6 i" x& W4 o# A- g
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight+ q( Q9 W7 I! r2 ~* ^
  31. }+ a* F- a9 D/ G$ u) |* m! O: C
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');" x- |. `) t+ ^+ M* t( Z; ?6 A
  33. //-->
    0 J; j% s% R/ u# W# h7 E
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
, `$ S5 X6 m( ]: H, K3 }
- N" o7 G: j0 H9 C8 ]/ m3 Y

, H5 S+ w8 u4 i8 m& ]% B靘皞:
Get viewport size (width and height) with javascript
, y) R' T0 k" c! d4 P0 D

1 m/ N, m: Y* S8 ~) @2 s- D
  @. s) {' t7 O0 a  S2 Q0 U

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-10-21 19:29 , Processed in 0.066903 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵