JavaScript Tutorial/HTML Tags/embed

Материал из Web эксперт
Перейти к: навигация, поиск

Embed

The Embed object references objects that is embedded within a Web page using the HTML <embed> tag.

Embed is typically used for audio and video files.

Embedded objects are referenced by either the embeds array or by name.



<html>
    <head>
    <title>Accessing an embedded object by array</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function stopsong(){
         document.embeds[0].stop();
    }
    -->
    </script>
    <embed src="your.midi" name="your" width="100" height="50" AUTOSTART="true">
    <br>
    <form>
    Click on the stop button to stop playing the midi file.
    <input type="button" value="stop" onCLick="stopsong()">
    </form>
    </body>
    </html>