52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 % |% j5 i, W( o& Y- R$ G* S

: z, D  O% C2 K5 t6 N餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具& h! ]& t' ^, O. L; E3 C
  1. <script type="text/javascript">5 i& b6 {, i. K: @8 o5 s: F
  2. <!--
    6 x3 c3 v- E: \
  3. ; O$ }$ N1 C6 H* A+ s
  4. var viewportwidth;0 R: P' T2 C5 ?( h) ~" {+ R
  5. var viewportheight;- Q# L+ ~; X) v$ `  U
  6. - A: u" _* Q: F/ H1 r: a
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight7 `$ \2 k7 F% A. w

  8. - Q1 F1 B, H+ g# ?) f  _
  9. if (typeof window.innerWidth != 'undefined')
    ; U6 n: B& |. p5 |' T
  10. {! x$ I; C2 J0 g  \, n- G
  11.       viewportwidth = window.innerWidth,1 @# E: ^% y. u6 C
  12.       viewportheight = window.innerHeight
      e+ q& P8 t' t" e
  13. }
    5 z& j+ v$ r0 H3 h

  14. : c- S$ |/ {$ T/ x' s
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)* t4 G6 h7 @  H7 O4 y
  16. . O4 @" [& P3 F2 A$ o
  17. else if (typeof document.documentElement != 'undefined'
    5 D3 }$ w9 E1 b9 G: i' D5 ?
  18.      && typeof document.documentElement.clientWidth !=
    " N) E; M# L% M! W7 \2 {
  19.      'undefined' && document.documentElement.clientWidth != 0)
    9 U. e" z( Z+ t* s" k. i9 G; c
  20. {
    " f$ d# _7 m3 z3 l
  21.        viewportwidth = document.documentElement.clientWidth,: {' V8 w) \- P. B' M
  22.        viewportheight = document.documentElement.clientHeight
    - }: z7 Z) }3 D5 D
  23. }
    ( W7 V) B" r, x1 F4 A6 g1 d! Y# L
  24. ' I& m* I, b$ ?8 S% k. W
  25. // older versions of IE7 D  y9 E6 p6 d$ P
  26. 8 {2 y8 E% e) O4 |0 B
  27. else
    * `, x# B# d' M
  28. {
    % h/ l' P5 z4 M; D9 x8 |
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
    4 n9 t5 x! m& G3 m8 K$ Y, ^
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight4 C6 ^. B' i# ~3 F
  31. }
    ; a" K) L) t3 A3 h
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    " g3 w' h/ r7 P! M
  33. //-->9 k* }2 o% M+ ^+ U
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯
  j3 ~; z" O0 f) s- f
" ~* u% {" p1 k/ B4 r: H2 k
- M1 ^" K* m+ L
靘皞:
Get viewport size (width and height) with javascript

3 h. s6 U6 D4 o3 z& n/ n  J# x' c; Q- f  p& r7 u( K* f

# H5 k4 z0 g0 x" H1 K& g0 r1 b, Q- o

雿輻券

祉蝛閬

撠蝝詨

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

QQ|撠暺撅||52AV璈A

GMT+8, 2025-12-6 09:24 , Processed in 0.059149 second(s), 19 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵