HTML CSS Reference/HTML Tag Reference/bgsound

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

"bgsound" CSS Attributes and JavaScript Style Properties

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | CSS |behavior text-autospace | | Attributes |text-underline-position | +----------------+--------------------------------------------------------------+

     </source>
   
  


"bgsound" Event Handlers

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Event |onLayoutComplete onMouseEnter | | Handlers |onMouseLeave onReadyStateChange | +----------------+--------------------------------------------------------------+

     </source>
   
  


"bgsound" Example

   <source lang="html4strict">
   

<html>

  <head>
     <title>bgsound element example</title>
     <bgsound src="yoursoundfile.wav" loop="3">
     <script language="javascript">
         function stopSound() {
              document.all.tags("bgsound")[0].volume = -10000; 
         } 
         function restartStop() {
              document.all.tags("bgsound")[0].volume = 0;
         } 
     </script>
  </head>
  <body>
  <button type="button" onClick="stopSound()">Stop the music</button>
  
<button type="button" onClick="restartStop()">Restart the music</button>

</body> </html>


     </source>
   
  


"bgsound" HTML Attributes

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | HTML |balance id | | Attributes |loop src | | |volume | +----------------+--------------------------------------------------------------+

     </source>
   
  


"bgsound" JavaScript Collections

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | JavaScript |all attributes | | Collections |behaviorUrns | +----------------+--------------------------------------------------------------+

     </source>
   
  


"bgsound" JavaScript Methods

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | JavaScript |addBehavior applyElement | | Methods |attachEvent clearAttributes | | |cloneNode componentFromPoint | | |detachEvent dragDrop | | |fireEvent getAttribute | | |getAttributeNode getElementsByTagName | | |insertAdjacentElement mergeAttributes | | |normalize removeAttribute | | |removeAttributeNode removeBehavior | | |setAttribute setAttributeNode | | |swapNode | +----------------+--------------------------------------------------------------+

     </source>
   
  


"bgsound" JavaScript Properties

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | JavaScript |balance canHaveHTML | | Properties |disabled id | | |isContentEditable isDisabled | | |isMultiLine loop | | |nextSibling nodeName | | |nodeType nodeValue | | |outerHTML outerText | | |parentElement parentNode | | |parentTextEdit previousSibling | | |readyState scopeName | | |sourceIndex src | | |tagName tagUrn | | |uniqueID volume | +----------------+--------------------------------------------------------------+

     </source>
   
  


"bgsound" Microsoft Behaviors

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Microsoft |clientCaps download | | Behaviors |homePage | +----------------+--------------------------------------------------------------+

     </source>
   
  


"bgsound" Syntax and Note

   <source lang="html4strict">

Note: Play a sound while the user visits the page. <bgsound> is only allowed inside the <head> element. The sound file specified in its src attribute. The file format can be in the .wav, .au, or .mid formats.

Syntax:

<bgsound attributes events>


     </source>