ÂsÄý¾¹­I´º­µ¼Ö¼½©ñ¤èªk

¦ó³B¹Ð®J¤ÀÃþ¾ÉÄý   HTML ¤å¥ó¯Á¤Þ


ÂsÄý¾¹ªº­I´º­µ¼Ö¼½©ñ
¦pªG¥u·Q¦bºô­¶¤¤¼½©ñ¤@¬q­I´º­µ¼Ö¨Ã¤£§xÃø¡A¦b§AÂsÄý³oºô­¶ªº¦¹¨è¡A¤£ºÞ§A ¥Îªº Explorer or Navigator ¡A¥u­n¬O 4.0 ª©¥H¤W¡A¨t²Î¤¤¦³¥¿½T¼½©ñ Midi ªº³]©w ¡AÀ³¸Ó¥i¥HÅ¥¨ì§Ú­Ì¥¿¬°§A¼½°eªº¦±¥Ø¡C¤£¹L­n´£¿ô Explorer ¨Ï¥ÎªÌª`·N¡A <BODY> ¼ÐÅÒªº BGSOUND ÄÝ©Ê¡ANavigator ¬O¤£¤ä´©ªº¡A¦pªG§A­n¨âÃä³q¥Î¡A ´N¸Ó§ï¥Î <EMBED> ¼ÐÅÒ¡A¥¿¦p¥»ºô­¶¡A<EMBED>¬O³o»ò¼gªº¡G
<EMBED src="002.mid" autostart=true loop="100" HIDDEN>
EMBED ¼ÐÅÒÄݩʪº·N¸q
¥H¥»ºô­¶ EMBED ¼ÐÅÒ¬°¨Ò¡G
  1. SRC:ÄݩʭȬ°¦r¦ê¡A­µ¼ÖÀÉ URL ¦ì§}¡C
  2. AUTOSTART:ÄݩʭȬ° ture or false ¡Aªí¥Ü¬O§_ºô­¶¤@¸ü¤J§¹¦¨´N ¦Û°Ê¼½©ñ¡C
  3. LOOP:ÄݩʭȬ°¾ã¼Æ¡Aªí¥Ü­n¼½©ñ´X¦¸¤~µ²§ô¡C
  4. HIDDEN:ÄY®æ»¡¨ä­È¤´¬° true or false ¡A¦ý¤£¹³ AUTOSTART ¨Ï¥Îµ¥¸¹¡A¥¦¬O¦³¥X²{ªí¥Ü true ¡A¨S¼gªí¥Ü false ¡Aªí¥Ü¬O§_Åã¥Ü EMBED ¼ÐÅÒ¾Þ§@­±ª©¡C
¥Ñ©ó§Ú­Ì­n§â EMBED °µ¦¨¹³­I´º­µ¼Ö¤@¼Ë¡A·íµM­n¦³ HIDDEN ÄÝ©Ê¡A§â¥¦¨º¾Þ§@­±ª© Âð_¨Ó¡A¨Ã¥BÅý¥¦ Autostart ¤@¤U¡A´N¸ò Explorer BGSOUND ®ÄªG®t¤£¦h¤F¡A¦Ó¥B Navigator ©M Explorer ³£¥i³q¥Î¡C
Åܦ۰ʬ°¤â°Ê
¦bºô­¶¤¤¼½©ñ­I´º­µ¼Ö§Ú¤@ª½¬Ý°µ¤p¨Æ¤@¼Î¡Aª½¨ì¦³¤Ñ¦³¦ìºô¤Í°Ý§Ú¡G¦pªG§Úªº ­I´º­µ¼Ö¤£­n Autostart ¡A¤]¤£­n Embed ªº¾Þ§@­±ª©¡A¦Ó¬O¥Ñ§Ú¦Û¤v³]ªº«ö¶s ¨Ó¶}¶}ÃöÃö¸Ó«ç»ò°µ¡H
³o¦b Explorer ¤¤·|½ÆÂø¤@¨Ç¡A¦ýÁÙ¬O¦³¿ìªkªº¡F¦]¬° Embed ª«¥ó¦b Explorer ¤¤¬O¥i°ÊºA¾Þ§@ªº¡C­É¥Ñ Embed ª«¥ó´£¨Ñªº stop() ©M play() ¤èªk¡A¥i¥H¶}Ãö ­µ¼ÖÀɮסA¦Ó Embed ¦³­Ó filename ÄÝ©Ê¡A«h¥i¥H§ó´«·Q­n¼½©ñªº­µ¼ÖÀÉ¡C¦ý Navigator ´N³Â·Ð¤F¡A¦]¬° Embed ¦UÄݩʦb Navigator ¤¤¡A¥u­n¤@¼g¨ì document ¤¤´N©w«¬¤F¡A§ÚÁÙ¯u¤£ª¾¹D¸Ó¦p¦ó¦b Script ±Ô­z¤¤§ó§ï Embed ªº³]©w¡C(¦pªG¦³ ³o¼Ëªº¿ìªk¡A½Ð±z¨Ó«H§iª¾¡A§Ú¤£³Ó·P¿E¡C)
¤]´N¬O»¡§Ú¹ï Navigator ªº¤F¸Ñ¬O¦pªG§A­n¶}Ãö­µ¼ÖÀÉ¡A§A¥²¶·³z¹L Embed ­±ª© ¾Þ§@¡A¦pªG§AÅý¥¦ Hidden ¡A´N¥²¶· Autostart ¡A§_«h¦p¦ó¶}±Ò©O¡H
Åܳq¿ìªk
´N³o»ò³Q Navigator °«±Ñ¤F¹ê¦b¤ß¦³¤£¥Ì¡A§ÚÂà©À¤@·Q¡A¦pªG document ¼g©w«á Embed ÄÝ©Ê´N¨S±o§ï¤F¡A¨º¦pªG¦b Script ¤¤¥Î document.write() ¤èªk°ÊºAªº¼g Embed ¼ÐÅÒ©O¡H¸g´ú¸Õ«áªGµM¦¨¥\¡C¦ý document.write() ¦³­Ó«ÜÁVªº«áªG¡A¨º´N¬O ¥¦·|¯}Ãa­ì¦³ªººô­¶¤º®e¡A¦pªG§Ú¥Î document.write() ­«¼gºô­¶¡A¨º¥u¯à°õ¦æ¤@¦¸ ¡A¨º¤S¤£¥i¯à§â­I´º­µ¼Ö¶}Ãö¦h¦¸¤F¡C³Ì«á§Ú·Q¨ì¥Î­¶®Ø²Õ (Frameset) °Ú¡I§â«ö¶s ©M Script ¼g¦b¥Ò­¶®Ø¡A¥Î document.write() §â Embed ±Ô­z¼g¨ì¤A­¶®Ø¡A©ó¬O¡A §Úªº§@«~ºô­¶ÂI°Û¾÷´N³o»ò½Ï¥Í¤F¡C±µ¤U¨Ó¤¶²Ð¤@¤Uºô­¶ÂI°Û¾÷ ¤j²¤ªº°µªk¡C
ÁôÂí¶®Ø
¦]¬°­n°°¸Ë¦¨­I´º¼½©ñ¡A©Ò¥H¥u¯àµ¹ÂsÄýªÌ¬Ý¨ì±±¨î­¶¡A¦Ó¤£¯àÅýÂsÄýªÌ¬Ý¨ì Embed ¿é¥X¨º¤@­¶¡A©Ò¥H§Úªº Frameset ¬O³o»ò¼gªº¡G
<frameset rows="0,100%">
    <frame src="sounda.htm" name="soundplayer" noresize scrolling=no BORDER="0" FRAMEBORDER="NO" FRAMESPACING="0">
    <frame src="soundb.htm" name="sounndcontroller" noresize scrolling=Auto BORDER="0" FRAMEBORDER="NO" FRAMESPACING="0">
</frameset>
Frame soundplayer ¦]¬°¬O¨Ñ¿é¥X Embed ±Ô­z¥Îªº¡A©Ò¥Hµ¹¥¦¼e«× 0 ¡AÂð_¨Ó¡C Frame soundcontroller ¬OÂsÄýªÌ¾Þ±±­¶¡A©Ò¥HÅý¥¦ 100 % ¦ûº¡¾ã­Ó window¡C
­µ¼Ö¶}Ãö«ö¶sªº³]­p
³o¬O­µ¼Ö¶}Ãö«ö¶s¨Ï¥Îªº¹Ï¤ù¡G
¶}±Ò¹Ï¤ù Sound Open pic1 Sound Open pic2 Sound Open pic3 Sound Turnoff
Ãö³¬¹Ï¤ù Sound Close pic1 Sound Close pic2 Sound Close pic3 Sound Turnon
³o¬O HTML CODE ±Ô­z¡G
<!-- ChooseSound() ¬Oºô­¶ÂI°Û¾÷°õ¦æ document.write() ªº¦Û­q¨ç¼Æ -->
<td><A HREF="" onclick="return ChooseSound(1)"><img src="mbut1b.gif" 
  width="136" height="39" NAME="mimg1" BORDER="0"></A></td>
¦Ü©ó¥Î <A> ¼ÐÅÒ¥]ÂÐ <IMG> ¼ÐÅÒ¡A¬O¬°¤F¾AÀ³ Navigator ªºª«¥ó¯S©Ê ¡A¦]¬°¸ÑÄÀ°_¨Ó¤S¬O¤@¤j½g¡A³oùؤ£¦AÂØ­z¡A½Ð¦Û¦æ°Ñ¦Ò ÀH·Æ¹«ÅÜ´«ªº¹Ï§Î³sµ²«ö¶s½d¨Ò¡C
document ¿é¥X Script ªº³]­p
  1. «Å§iÅܼưѷÓ
  2. /* player «üªº¬O¿é¥X soundplayer ªº¨º­Ó frame¡A
       oldno ¬O«e¤@­Ó³Q«ö¤Uªº¦±¥Ø«ö¶sªº½s¸¹¡C */
    var player,oldno=1;
    
    /* ºô­¶Åܼƪì©l¤Æ */
    function BodyLoadEvent()
    {
        /* ¥ÎÅܼưѷӼ½©ñ midi ªº­¶®Ø */
        player=parent.frames.soundplayer.document;
    
        /* ¥ý«ö¤UÃö³¬¦±¥Ø«ö¶s */
        ChooseSound(4);
    }
    
  3. ¼½©ñ¦±¥Ø§PÂ_
  4. /* ¼½©ñ¿ï¾Ü¦±¥Ø */
    function ChooseSound(no)
    {
        /* °Ñ·Ó«e¤@­Ó¤Î²{¤@­Ó³Q«ö¤Uªº¦±¥Ø«ö¶s */
        var oldimg=document.images["mimg"+oldno];
        var newimg=document.images["mimg"+no];
    
        /* §ïÅܦ±¥Ø«ö¶sªº¹Ï¤ù */
        oldimg.src=eval("mbut"+oldno+"b.src");
        newimg.src=eval("mbut"+no+"a.src");
        /* °O¿ý³o¦¸ªº«ö¶s */
        oldno=no;
    
        /* no==4 ¬OÃö³¬¦±¥Ø¡A¨ä¥L¨Ì¦±¥Ø½s¸¹¼½©ñ¡C */
        if (no==4) {CloseSound();}
        else {WriteToPlayarea("00"+no+".mid");}
    
        return false;
    }
    
  5. Ãö³¬­µ¼Öªº±Ô­z
  6. /* Ãö³¬¦±¥Ø */
    function CloseSound()
    {
        player.open();
        player.write("<HTML><HEAD><TITLE></TITLE></HEAD>");
        player.write('<BODY bgcolor="#000000" TEXT="#000000">');
        /* BODY °Ï¬q¤¤¨S¦³ Embed ±Ô­z */
        player.write("</BODY></HTML>");
        player.close();
    }
    
  7. ¼½©ñ­µ¼Öªº±Ô­z
  8. /* §â¦±¥Ø¼g¨ì soundplayer ¼½©ñ­¶®Ø¼½©ñ */
    function WriteToPlayarea(sname)
    {
        player.open();
        player.write("<HTML><HEAD><TITLE></TITLE></HEAD>");
        player.write('<BODY bgcolor="#000000" TEXT="#000000">');
        /* BODY °Ï¬q¤¤¿é¥X Embed ¦UÄݩʱԭz */
        player.write('<EMBED src="'+sname+'" autostart="true" loop="100" HIDDEN>');
        player.write("</BODY></HTML>");
        player.close();
    }
    
¨ä¥Lª`·N¨Æ¶µ
  1. ÁöµM Frameset ¤¤ soundplayer ­¶¥u¬O Script ±Ô­z°Ï¡A¨Ã¤£»Ý­n¯u ¥¿ªº¦b¹êÅéºô­¶¤¤Åã¥Ü¤°»ò°T®§¡A¦ý§A«o¤@©w­n¦b soundplayer ¤¤ ¸ü¤J¤@¥÷¹êÅéºô­¶¡A§_«h Navigator ·|¦³ª«¥ó°Ñ·Ó¤£¨ìªº¿ù»~¡A¸Ô±¡ ½Ð¨£§ì¤£¨ìªº­¶®Ø ¡C
  2. ºô­¶ÂI°Û¾÷ÁöµM¥Hºô­¶­µ¼ÖÀɼ½©ñ¬°¥D¡A¦ý Script °Ï¬q¤¤ ¦³¤j¶q¦³Ãö°ÊºA¹Ï¤ùÅÜ´«ªº Script ±Ô­z¡A¦pªG¨º¨Ç¥O§A°g´b¡A½Ð°Ñ¦Ò ÀH·Æ¹«ÅÜ´«ªº¹Ï§Î³sµ²«ö¶s½d¨Ò¡C
  3. ¦]¬°¤@¦@­nÀHºô­¶¤U¸ü¤T­º mid ¡A®É¶¡·|©ìªº¤[¨Ç¡A¦A¥[¤W ¦ó³B¹Ð®J ¥H¤å¦rºô­¶¬°¥D¡A¬°§K³Q¤H¬Ý«ó¤F¡A©Ò¥H½Ð®e³\§Ú »Å¬¯¤@¤U¡A¦h¥[¤F´X±i¹Ï¤ù¡A¾á»~±zÄ_¶Q®É¶¡¡A¦b¦¹¥ý­Pºp¡C¦n¤F¡A ³o´N¬O§Ú¤ñ¸û¶O¤ßªº¤@¥÷ºô­¶ ºô­¶ÂI°Û¾÷¡C
  4. ¦pªG§A·Q§ó¸Ô²Ó¤F¸Ñ ºô­¶ÂI°Û¾÷ ©Ò¦³²Ó¸`¡A¬°¤F·PÁ§A¦³­@ ¤ß§â³o¤S¯ä¤Sªøªººô­¶¬Ý¨ì²{¦b¡A³o¬O§Úªº¤@ÂI¤p§ª«¡A ¥´¥]¤U¸ü¡AÂ÷½u¾\Ū¡C

¦ó³B¹Ð®J¤ÀÃþ¾ÉÄý   HTML ¤å¥ó¯Á¤Þ


1