52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩
: c6 I- H9 |- ^; p
4 y2 |8 Q- C6 ]1 B餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具& m, b# Q2 T) ?3 T. d6 z
  1. <script type="text/javascript">
    / m7 M, X/ f' q0 _" B! k) b  d! w+ u
  2. <!--) H1 S0 w( M- r

  3. + `5 c8 E. [9 w% T
  4. var viewportwidth;+ g4 v" J) c9 J9 C
  5. var viewportheight;' {3 u: m8 w+ n8 T

  6. 6 L# o. r  s) }6 L# L- A! {
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight  ]0 N) x2 h# X% ]
  8.   ^' ?! k: e6 }+ P4 `! l8 `" u- L
  9. if (typeof window.innerWidth != 'undefined'). ]& _& o9 S* F5 P" p. H
  10. {( P; l& E. {# n* f2 Z/ l
  11.       viewportwidth = window.innerWidth,$ m" \6 s6 D8 _0 G) Q" Y) V% \+ \
  12.       viewportheight = window.innerHeight
    / P, j) h) _5 H+ q* Q
  13. }
    & R6 F2 q5 Z' J/ Q
  14. * f$ A2 Q) V3 F
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)* R+ S/ w- ?: o7 X, y& p
  16. ' D5 f) y" S4 @9 B8 C
  17. else if (typeof document.documentElement != 'undefined'# Q$ i6 R: p6 H5 V- a' a0 F
  18.      && typeof document.documentElement.clientWidth !=
    ; S6 c& J) u7 q0 _* b/ G8 i
  19.      'undefined' && document.documentElement.clientWidth != 0); I. O+ K' H+ s
  20. {
    / A* s7 _: U2 u! y) P: k
  21.        viewportwidth = document.documentElement.clientWidth,
    2 }2 m  _  t7 i. ?, g, W  y- `
  22.        viewportheight = document.documentElement.clientHeight
    7 p4 L" K4 z# c- w* R, P( t: a
  23. }" A: H( W2 K' C9 g" H

  24. # p1 k! P  S( y- V( P7 j
  25. // older versions of IE
    ' p$ p% p- |- M; ]

  26. 8 ?3 S* a1 W% c) `
  27. else( I* P( t5 k) O# i  m  h9 {
  28. {
    3 s" e; b: K: A
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    0 K# p6 m' ]" |: }. `
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight
    ! P& x2 ]  @- d. _! j
  31. }* f# a8 n. G3 t5 W
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');1 P% ~! A3 t0 H9 c
  33. //-->" r" }- b5 a  q% Y# K9 h
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯, z5 h1 J- u# r7 {, A. h0 A

+ l+ e( m% D: D# o* [

! S& H$ z0 S+ b! X靘皞:
Get viewport size (width and height) with javascript

' W9 {; W& Z; i- `, _9 V
- U3 s' m6 m' R$ l: z; `

" S, Y. ^5 m- {& V& T+ b

雿輻券

祉蝛閬

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

QQ|撠暺撅||52AV璈A

GMT+8, 2026-2-10 10:54 , Processed in 0.068065 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵