52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 3 Q+ B7 d7 Z- b2 T

: i# b" H6 p1 F+ o3 q1 }餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具
1 |5 ~/ E( Y, n+ I+ e' p
  1. <script type="text/javascript"># e0 ^% Y* n4 u! |. ^" `) s$ m- g
  2. <!--* M; h3 R7 h, J

  3. * I7 s4 [0 C9 ]& r
  4. var viewportwidth;0 Y7 r/ B# w! A$ A' ]2 i* b
  5. var viewportheight;
    ( e/ Q# l$ R- s4 F' \

  6. 9 B" s3 f# i+ A) k$ O
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    ' E0 ~! d5 p2 x8 K* [/ v( o" s8 a

  8. $ m( x% C$ ]7 n- b9 l0 O. g; A" m1 s6 i
  9. if (typeof window.innerWidth != 'undefined')
    & y4 H" |% d$ r' M
  10. {) O) Z2 ]  e7 f( O% V5 C6 r
  11.       viewportwidth = window.innerWidth," k# o$ u8 Y0 _7 j8 `$ [* G
  12.       viewportheight = window.innerHeight3 H2 t5 q! M. W7 l% Y2 y
  13. }8 q  ]6 V/ T8 s

  14. 4 I0 a# d' U5 D# ~7 r$ a) W
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    6 A3 b  A" S. K7 S* D7 X

  16. $ s2 V& U+ ]& u) a7 S7 ?0 o( q
  17. else if (typeof document.documentElement != 'undefined'
    - y( ?7 Q  q# C- Z! N% x
  18.      && typeof document.documentElement.clientWidth !=
    0 d* ^8 p0 r' M2 {3 H6 r
  19.      'undefined' && document.documentElement.clientWidth != 0)
    + A6 \- z8 @0 T# k) Z# u( ~
  20. {
    9 C" X' d, ~. g9 h/ H4 [
  21.        viewportwidth = document.documentElement.clientWidth,
    + U7 w0 q( ?) u9 N' m5 U
  22.        viewportheight = document.documentElement.clientHeight
    4 ]. K6 p; I5 [$ C/ \" S
  23. }
    2 Q6 D! A- n7 h7 K/ s: A( f
  24. ! v9 Y! f/ t0 p7 Q7 z
  25. // older versions of IE& [: r" G! s4 n& J' @6 E

  26. 7 g( ?6 k: H. N, F
  27. else, P/ B+ t  m& R6 U, L  J5 |# f6 C$ X- k
  28. {  s6 ]+ C& E) y0 ^
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth," H& t/ r6 [6 _
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight4 @* {. s' W; `  V
  31. }
    % _  d% P* }$ Z# x0 c
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    3 @' h1 ~# z' p' r
  33. //-->% J; W5 [  }) P4 x
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
4 L2 x4 q7 z" Z- C. l
% H* g  z1 [/ C" ^9 O9 V5 L

9 ]' q& ?6 H% H靘皞:
Get viewport size (width and height) with javascript

/ X# Q/ m& ?/ h! q5 h! b
$ F6 a, ?7 L3 b: m: ^/ t
7 q1 `' W% V" Y; a" e9 X

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-3-1 16:43 , Processed in 0.071055 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵