52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-10 17:42:11 | 芰閰脖 |芰憭批 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-10 19:08 蝺刻摩 ; D3 }- M  A2 ]

2 O! @  t. c- r! Q5 e. q餈甫avascript閬蝒憭批嚗唬閬賢函⊥菜葫銝撖祇憿敺靘曉唬畾菟畾萇撘蝣潘嗥冽潮曉之銝阡*蝷箸澆臭葉憭桐蝵格撣豢具! j( D) T/ h9 K4 Z* e- A
  1. <script type="text/javascript">
    $ G; B( U- e# P7 p
  2. <!--/ I" r& e6 p% G1 `% |" E
  3. 0 |5 ~$ `# P, ]- }. u/ i1 d
  4. var viewportwidth;% X1 K- F8 {, `( M" a' E7 m
  5. var viewportheight;
    " j. R1 n$ B8 q8 r; q

  6. ) L( f' T7 A  P- t+ a
  7. // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    1 `7 z- J1 A5 ^7 X3 G+ ~% K" C+ `
  8. 3 s; w) I# ?2 J% ?; }
  9. if (typeof window.innerWidth != 'undefined')! v; [; w5 r5 [6 K9 C; I1 h
  10. {- b, ^0 c$ K6 p4 \6 M
  11.       viewportwidth = window.innerWidth,# C% {+ I" W% ]1 Y! b
  12.       viewportheight = window.innerHeight& z+ {: s5 m# z) N" t
  13. }
    2 a# f, ?. o( w3 o. v

  14. # f+ w+ b. T+ j, o$ v8 A
  15. // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)- v: C; i) }% d1 w) ]2 a
  16. + X; Q. ]. o6 e
  17. else if (typeof document.documentElement != 'undefined'
    : M2 G& V0 r. J8 X2 X( X3 f
  18.      && typeof document.documentElement.clientWidth !=
    $ z$ V/ q2 N5 w. f' |
  19.      'undefined' && document.documentElement.clientWidth != 0)  ]9 E" X3 D+ r
  20. {! |0 e3 X, U8 e! }3 j9 T# u+ q* ~
  21.        viewportwidth = document.documentElement.clientWidth,
    3 S; o, T( ~1 t4 @0 s2 X# \7 w7 b
  22.        viewportheight = document.documentElement.clientHeight
    1 O- Q) Z' ?" P) P* H
  23. }
    # t9 c  q3 V+ V/ I4 L2 Q$ X

  24. : d# I4 s$ Z6 E8 h- l
  25. // older versions of IE
    8 R: r7 s' m2 J! ]2 k; P

  26. ' S" R$ N% M. k( g+ X7 J
  27. else
    ; ~3 E- T* \+ z; `! ~# N8 U7 ~/ `
  28. {+ a& F( z: c% f# k! Y# Z6 Z* @) R
  29.        viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
      d8 s5 B- K' e
  30.        viewportheight = document.getElementsByTagName('body')[0].clientHeight8 W/ _8 \% e8 j5 {/ r
  31. }1 i& o6 l2 M! m2 x" L
  32. document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');7 a/ u$ ]8 g- Y1 j6 G8 d
  33. //-->- |; V2 ^& e7 \+ Z5 g" X
  34. </script>
銴鋆賭誨蝣
蝯: 狂oogle chrome 憿舐內蝯1 S. n7 M9 P0 f7 {6 @
+ {& _2 O6 r; z# A
/ |# d# b, D' Z1 ~; |* L
靘皞:
Get viewport size (width and height) with javascript
9 ~- @4 K8 O& o' a
( k# @7 l  ]: S+ K4 w( V+ ?
0 U* s5 M2 x$ m! r" h

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-25 04:12 , Processed in 0.075459 second(s), 19 queries .

蝯∠.撱

[email protected] | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵