Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

play background music in html jasvascript

<audio src="https://www.bensound.com/bensound-music/bensound-moose.mp3"></audio>

<Script>
  window.addEventListener("DOMContentLoaded", event => {
    const audio = document.querySelector("audio");
    audio.volume = 0.2;
    audio.play();
  });
</Script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: css how to make a div scrollable 
Javascript :: angular rebuild 
Javascript :: ngfor on keys of a dictionary angular 
Javascript :: heroicons nextjs 
Javascript :: mongoose model find all documents with ids in array 
Javascript :: reduce average javascript 
Javascript :: jqiery call onclick in another element 
Javascript :: find sibling in jquery 
Javascript :: node sleep 
Javascript :: remove all numbers from string javascript 
Javascript :: remove slashes from string javascript 
Javascript :: jquery set select readonly 
Javascript :: npm ERR! path node_modules/node-sass 
Javascript :: how to play jquery audio 
Javascript :: regex email javascript 
Javascript :: format percentage javacsript 
Javascript :: fatal no configured push destination 
Javascript :: create random hex in node 
Javascript :: javascript count elements in json object 
Javascript :: installing node on ec2 instance 
Javascript :: get lines as list from file node js 
Javascript :: create a new input with type checkbox javascript 
Javascript :: javascript text to clipboard 
Javascript :: mui image 
Javascript :: jquery insert element as first child 
Javascript :: remove last character from string jquery 
Javascript :: how to add two number using jqueryu 
Javascript :: Masonry js cdn 
Javascript :: check if element is hidden jquery 
Javascript :: js convert nodelist to array 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =