repl.it
@manumanuk/

Play Sound HTML

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • colorblast.jpg
  • mars.jpg
  • Music 2.mp3
  • redgradient.jpg
  • script.js
  • style.css
  • sunset.jpeg
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html><!--<iframe height="0" width="0" frameborder="0" src="Music 2.mp3"></iframe>-->
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <style>
    .triangle-right {
      width: 0;
      height: 0;
      border-top: 25px solid transparent;
      border-left: 50px solid #FE0101;
      border-bottom: 25px solid transparent;
    }
    </style>
    <div class="triangle-right"></div>
    <!--THIS WORKS-->
    <a onmousedown="playSound('Music 2.mp3')"><button class = "btn">Sound</button></a>
    <!--<img src="image.jpg" alt="BFR rocket"/>-->
    <button onclick="collectPixels()">Click Me</button>
    <div id="color" style="width:200px;height:50px;float:left"></div>
    <canvas id="canvas"></canvas>
    <script src = "script.js"></script><!--
    <form action = "upload.php" method="POST" enctype="multipart/form-data"><input type="file" name="file"><button type="submit" name="submit">UPLOAD IMAGE</button>-->
    <!--
    <audio controls>
      <source src="Music 2.mp3" type="audio/mpeg">
    <audio controls>
    -->
  </body>
</html>
result
console
?