ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[±Ð¾Ç] (±Ð¾Ç²Ä38½g) °ïÅ|»P¤¸¥ó¦ì¸m

[±Ð¾Ç] (±Ð¾Ç²Ä38½g) °ïÅ|»P¤¸¥ó¦ì¸m

³o¤@¸`¬O¥»±Ð¾Ç³Ì«á¤@­Ó³æ¤¸¡A¤p»x±N¤£¦b¸Ô²Óªº²z½×¸Ñ»¡¤F¡I¦]¬°©Ò¦³ªºª«¥ó¡B¤¸¥ó¡Kµ¥µ¥ªº²z½×¤§«e³£½Í¹L¤F¡A²{¦b¬OÅ禬ªº®É¨è¤F¡A¤p»xª½±µ±N¤§«e©Ò½Íªº°j°é¡]for¡^¡B§PÂ_±Ô­z¡]if¡^¡B°}¦Cª«¥ó(Array)¡B¤¸¥ó°ïÅ|¡B¤¸¥ó¦ì¸m±±¨îµ¥µ¥¡Aª½±µÀ³¥Î¦b¥»¸`ªººî¦Xºt½m½d¨Ò¤¤¡C

¦pªG§A¤@¸ô±N¥»±Ð¾Ç¾\Ū¦Ü¦¹¡A¬Û«H§A¤w¨ã³Æ¬Û·íªºJavaScript³]­p¯à¤O¡A©Ò¿×¡G¡u®v¤÷»â¶iªù¡B­×¦æ¦b­Ó¤H¡v¡A¤p»x¯àµ¹§Aªº¥u¬O¤@¶ô¶ô³æ¿Wªº¿n¤ì¡A­n¦p¦ó±N³o¨Ç¿n¤ì«÷¦¨³ùÂS¡A´N±o¾a¦U¦ìŪªÌ¦Û¤vÅo¡A¤p»x¸Û¤ßªº§Æ±æ¤j®a¦b¾\Ū¥»®Ñ¤§«á¯à³]­p¥XÄÝ©ó¦Û¤vªºJavaScript¡A¦Ó¤£­n¨ìºô¸ô¤Wª½±µ±N§O¤Hªº¦¨ªG«þ¨©¨ì¦Û¤vªººô¯¸¤¤¨Ï¥Î¡A©ÎªÌ¬O¶R¥»¶°JavaScriptµ{¦¡¤j¥þªº®Ñ¦^¨Ó§Û§Û¼g¼g¡C¨þ¡ã¤p»x¼o¸Ü¤Ó¦h¤F¡A¤£­n¨£©Ç£«¡I

ºî¦Xºt½m¡G¶Ã¼Æ­¸¦æ¶°¤¤©w¦ìªº¤å¦r

¦ó¿×¶Ã¼Æ­¸¦æ¡H¶Ã¼Æ­¸¦æ´N¬O§Ú­Ì¤£¦bCSS¼Ë¦¡ªí¤¤ª½±µ«ü©w¤å¦r¦r¦êªº¦ì¸m¡A¦]¬°¦pªG¦bCSS¼Ë¦¡ªí¤¤³]©w«h¤å¦r¦r¦êªº¦ì¸m±N¬O©T©wªº¡I¦ý¬O¡A§Ú­Ì¥i¥H¨Ï¥ÎJavaScriptµ{¦¡¨Ó°ÊºAªº«ü©w¤å¦r¦r¦êªº¦ì¸m¡C



¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!


  • ³o­Ó®ÄªG¥²¶·¥ý¦bCSS¼Ë¦¡ªí¤¤¥ý¨M©w¤T­Ó¼h¦¸ªº¤å¦r¦r¦êªº°ò¥»¼Ë¦¡¡A¦ý¬O§Ú­Ì¨Ã¤£³]©w¤å¦r¦r¦êªº¦ì¸m¡A§Ú­Ì§â¤å¦r¦r¦êªº¦ì¸m«O¯d¨ìJavaScriptµ{¦¡¤¤°ÊºA³]©w¡A¥ÑJavaScriptµ{¦¡°ÊºA³]©w¦U¼h¦¸¤å¦r¦r¦êªº¦ì¸m¡A¦P®É§Q¥ÎJavaScriptµ{¦¡¨Ó±±¨î¦U­Ó¼h¦¸¤å¦rªº¥X²{»P§_¡I

    ©w¸q¤T²Õ¥Î¨Ó§@¬°º¥¦¨¤å¦r°ïÅ|¼h¦¸ªººô­¶¤å¦r¼Ë¦¡¡G¦b¥D¤å¤¤(¥]¬A¦b<BODY>»P</BODY>¼ÐÅÒ¤§¤¤ªººô­¶¤º®e)¤Z¬O¹J¨ìºô­¶¼ÐÅÒ¬°<DIV>¡A¨Ã¥B¦b<DIV>¼ÐÅÒ¤¤¥[µù¼Ë¦¡Ãþ§O®É¡A´N±N¨ä³Q¥]¬A¦b<DIV>»P</DIV>ºô­¶¼ÐÅÒ¤¤ªº¦r¦ê¤å¦r®æ¦¡©w¬°§Ú­Ì©Ò«Å§iªººô­¶¤å¦r¼Ë¦¡¡G
    1. .Style1{COLOR: #0000ff; FONT-SIZE: 16pt; POSITION: absolute;}
    2. .Style2{COLOR: #00ff00; FONT-SIZE: 16pt; POSITION: absolute;}
    3. .Style3{COLOR: #ff0000; FONT-SIZE: 16pt; POSITION: absolute;}
    ½Æ»s¥N½X
    ¥[µù¼Ë¦¡Ãþ§O¬°Style1ªºCSS¼Ë¦¡©Ê½è«Å§i±N¨Ïºô­¶¼ÐÅÒªº¤å¦r¦r¦ê¾Ö¦³ÂŦâ¡B¦rÅé¤j¤p¬°¢°¢µptªº¥~Æ[¼Ë¦¡¡C

    ¥[µù¼Ë¦¡Ãþ§O¬°Style¢±ªºCSS¼Ë¦¡©Ê½è«Å§i±N¨Ïºô­¶¼ÐÅÒªº¤å¦r¦r¦ê¾Ö¦³ºñ¦â¡B¦rÅé¤j¤p¬°¢°¢µptªº¥~Æ[¼Ë¦¡¡C

    ¥[µù¼Ë¦¡Ãþ§O¬°Style3ªºCSS¼Ë¦¡©Ê½è«Å§i±N¨Ïºô­¶¼ÐÅÒªº¤å¦r¦r¦ê¾Ö¦³¬õ¦â¡B¦rÅé¤j¤p¬°¢°¢µptªº¥~Æ[¼Ë¦¡¡C

  • µ{¦¡¤º®e
    1. SCRIPT language="javascript">
    2. var speed = 5¡@//¶Ã¼ÆÅÜ´«¦ì¸mªº³t«×
    3. var Count = 0
    4. var Fcount = 50¡@//¶Ã¼ÆÅÜ´«¦ì¸mªº¦¸¼Æ
    5. var TimeID
    6. var IsFly = false¡@//§PÂ_¬O§_¶i¦æ­¸¦æ°Ê§@ªººX¼ÐÅܼÆ
    7. var lay

    8. //¥H¤U¬°¶Ã¼Æ­¸¦æ¦r¦êªì©lªº¦ì¸m©w¦ì³]©w
    9. var StarFly = new Array()
    10. StarFly[1] = 0
    11. StarFly[2] = 50
    12. StarFly[3] = 0
    13. StarFly[4] = 50
    14. StarFly[5] = 0
    15. StarFly[6] = 50

    16. //¥H¤U¬°¶Ã¼Æ­¸¦æ¦r¦ê³Ì«áªº¦ì¸m©w¦ì³]©w
    17. var EndFly = new Array()
    18. EndFly[1] = 10¡@//²Ä¤@¼h¦¸¶Ã¼Æ­¸¦æ¦r¦ê³Ì«áªº¤ô¥­¶b(Left)¦ì¸m©w¦ì³]©w
    19. EndFly[2] = 30¡@//²Ä¤@¼h¦¸¶Ã¼Æ­¸¦æ¦r¦ê³Ì«áªº««ª½(Topt)¦ì¸m©w¦ì³]©w
    20. EndFly[3] = 20¡@//²Ä¤G¼h¦¸¶Ã¼Æ­¸¦æ¦r¦ê³Ì«áªº¤ô¥­¶b(Left)¦ì¸m©w¦ì³]©w
    21. EndFly[4] = 40 //²Ä¤G¼h¦¸¶Ã¼Æ­¸¦æ¦r¦ê³Ì«áªº««ª½¶b(Top)¦ì¸m©w¦ì³]©w
    22. EndFly[5] = 30¡@//²Ä¤T¼h¦¸¶Ã¼Æ­¸¦æ¦r¦ê³Ì«áªº¤ô¥­¶b(Left)¦ì¸m©w¦ì³]©w
    23. EndFly[6] = 50¡@//²Ä¤T¼h¦¸¶Ã¼Æ­¸¦æ¦r¦ê³Ì«áªº««ª½¶b(Top)¦ì¸m©w¦ì³]©w

    24. function Roundtext(){

    25. for(var i = 1; i <=3; i++)
    26. {
    27. lay = document.all("fly"+i)¡@
    28. //"fly"¬°ºô­¶¤¤ <DIV>¼ÐÅÒ¤º©Ò«ü©wªº¥Did¦WºÙ
    29. lay.style.visibility = "visible"
    30. StarFly[i*2-1] = Math.round(Math.random()*document.body.clientWidth - lay.style.posWidth)
    31. StarFly[i*2] = Math.round(Math.random()*document.body.clientHeight- lay.style.posHeight)
    32. }

    33. Count++;
    34. if(IsFly==false)
    35. {
    36. IsFly = true;
    37. for(var i = 1; i <= 3; i++)
    38. {
    39. //°ÊºA¶Ã¼Æ³]©w¤å¦r¦r¦êªº¤ô¥­¦ì¸m(Left)
    40. lay.style.posLeft = Math.round(StarFly[i*2-1] + (EndFly[i*2] - StarFly[i*2-1])/Fcount * Count)
    41. //°ÊºA¶Ã¼Æ³]©w¤å¦r¦r¦êªº««ª½¦ì¸m(Top)
    42. lay.style.posTop = Math.round(StarFly[i*2] + (EndFly[i*2-1] - StarFly[i*2])/Fcount * Count)
    43. lay = document.all("fly"+i)

    44. if(Count <= Fcount){IsFly = false}
    45. }
    46. TimerID = setTimeout("Roundtext()",speed)
    47. }
    48. else{clearTimeout(TimeID)}
    49. }
    50. </SCRIPT>
    ½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP


  • ¶}©l¥D¤å(<BODY>¼ÐÅÒ)¨Ã¦bºô­¶¼ÐÅÒ<DIV>¤¤ª½±µ¥[¤J§Ú­Ì©Ò«Å§iªºCSSÄÝ©ÊÃþ§O(class)³]©wCLASS="XXXX"¡A¦P®É¡A§Ú­Ì¥²¶·±N<BODY>¼ÐÅÒ¤º®e¥[¤Wonload="Roundtext()"¦¨¬°<BODY onload="Roundtext()">¡A·íºô­¶³Q¸ü¤J®É´N©I¥sRoundtext()¨ç¦¡¶}©l²£¥Í¦³¤T­Ó¼h¦¸¶Ã¼Æ­¸¦æ¦Ó«á¶°¤¤©w¦ìªº¤å¦r¦r¦ê¯S®Ä¡C

  • ¦bºô­¶¼ÐÅÒ<div>¤¤ª½±µ¥[¤J§Ú­Ì©Ò«Å§iªºCSSÄÝ©ÊÃþ§O(class)³]©w«á¡A¥²¶·µ¹³Q¥]¬A¦b<DIV>»P</DIV>ºô­¶¼ÐÅÒ¤¤ªº¦r¦ê¤å¦r¤@­Ó¯S¦³ªº¿ë§O¦WºÙ(id)¡C½Ð¯S§Oª`·N¡Gid ªº¦WºÙ¤º®e¥²¶·¬O³sÄòªº½s¸¹¦WºÙ¡A¦P®É¥D¦WºÙ¥²¶·°t¦XJavaScript µ{¦¡¨Ó©R¦W¡I(id="¥D¦WºÙ¡Ï³sÄò¼Æ¦r½s¸¹")
    1. <BODY onload="Roundtext()">
    2. <DIV class="Style1" id="fly1">¶Ã¼Æ­¸¦æ¶°¤¤©w¦ìªº¤å¦r¦r¦ê</DIV>
    3. <DIV class="Style2" id="fly2">¶Ã¼Æ­¸¦æ¶°¤¤©w¦ìªº¤å¦r¦r¦ê</DIV>
    4. <DIV class="Style3" id="fly3">¶Ã¼Æ­¸¦æ¶°¤¤©w¦ìªº¤å¦r¦r¦ê</DIV>
    ½Æ»s¥N½X
    ª`·N¡I¡I
    ¦b<DIV>»P</DIV>ºô­¶¼ÐÅÒ¤¤¥²¶·¥[¤J¦U¼h¦¸ªº¤å¦r¦r¦ê¡A¦¹³Bªº¤å¦r¦r¦ê¨Ã«D¥Ñµ{¦¡¨Ó°ÊºA²£¥Í¡Iµ{¦¡¥u¦³°ÊºA¦a¨Ó³]©w¦U¼h¦¸¤å¦r¦r¦êªº¦ì¸m(Position)¡C



  • ¥[¤Jµ²§ôºô­¶¥D¤å(</BODY>)»Pºô­¶¥DÅé(</html>)¼ÐÅÒ¡A¤j¤½§i¦¨¡I
  1. <HTML>
  2. <HEAD>
  3. <TITLE>ºî¦Xºt½m</TITLE>
  4. <STYLE>
  5. <!--
  6. .Style1 {COLOR: #0000ff; FONT-SIZE: 16pt;  POSITION: absolute; }
  7. .Style2{COLOR: #00ff00; FONT-SIZE: 16pt; POSITION: absolute;}
  8. .Style3 {COLOR: #ff0000; FONT-SIZE: 16pt;  POSITION: absolute; }

  9. -->
  10. </STYLE>

  11. <SCRIPT language="javascript">
  12. var speed = 5
  13. var Count = 0
  14. var Fcount = 50
  15. var TimeID
  16. var IsFly = false
  17. var lay

  18. var StarFly = new Array()
  19. StarFly[1] = 0
  20. StarFly[2] = 50
  21. StarFly[3] = 0
  22. StarFly[4] = 50
  23. StarFly[5] = 0
  24. StarFly[6] = 50
  25. var EndFly = new Array()
  26. EndFly[1] = 10
  27. EndFly[2] = 30
  28. EndFly[3] = 20
  29. EndFly[4] = 40
  30. EndFly[5] = 30
  31. EndFly[6] = 50


  32. function Roundtext(){
  33.    
  34. for(var i = 1; i <=3; i++)
  35. {
  36. lay = document.all("fly"+i)
  37. lay.style.visibility = "visible"                                         
  38. StarFly[i*2-1] = Math.round(Math.random()*document.body.clientWidth - lay.style.posWidth)
  39.             StarFly[i*2] = Math.round(Math.random()*document.body.clientHeight- lay.style.posHeight)
  40. }

  41. Count++;
  42. if(IsFly==false)
  43. {
  44. IsFly = true;
  45. for(var i = 1; i <= 3; i++)
  46. {
  47.                        
  48. lay.style.posLeft = Math.round(StarFly[i*2-1] + (EndFly[i*2] - StarFly[i*2-1])/Fcount * Count)
  49.                                 lay.style.posTop = Math.round(StarFly[i*2] + (EndFly[i*2-1] - StarFly[i*2])/Fcount * Count)
  50. lay = document.all("fly"+i)
  51.                                                
  52. if(Count <= Fcount){IsFly = false}
  53. }
  54. TimerID = setTimeout("Roundtext()",speed)
  55. }
  56. else{clearTimeout(TimeID)}
  57. }
  58. </SCRIPT>

  59. </HEAD>
  60. <BODY onload="Roundtext()">
  61. <DIV class="Style1" id="fly1">¶Ã¼Æ­¸¦æ¶°¤¤©w¦ìªº¤å¦r¦r¦ê</DIV>
  62. <DIV class="Style2" id="fly2">¶Ã¼Æ­¸¦æ¶°¤¤©w¦ìªº¤å¦r¦r¦ê</DIV>
  63. <DIV class="Style3" id="fly3">¶Ã¼Æ­¸¦æ¶°¤¤©w¦ìªº¤å¦r¦r¦ê</DIV>
  64. </BODY></HTML>
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD