我想在单击的按钮上播放音乐,然后一起打开新窗口。请帮我解决。 在这里,我的工作完成了。.
<body>
<style="background-image: url(40007-happiestbday.html)"/>
<div class="container">
<div class="main-greeting">
<div align="center html2canvas-ignore">
<div style="font-size: 17px; font-weight: 800; color: yellow;">
<p id="demo"></p>
<div class="main\_body">
<div class="vi" style="text-align: center;">
<img src="Snow\_falling1.gif" class="swing1" alt="diwali" style="width: 100%; height:100px;">
<h3>Wishing You</h3>
<h2>Merry Christmas</h2>
<audio>
<id ="myAudio">
<source src="https://firebasestorage.googleapis.com/v0/b/myapplication-3167b.appspot.com/o/hpbd.mp3?alt=media&token=88b03e37-cae7-48aa-95c9-817f8c9959c5" type="audio/ogg">
<source src="https://firebasestorage.googleapis.com/v0/b/myapplication-3167b.appspot.com/o/hpbd.mp3?alt=media&token=88b03e37-cae7-48aa-95c9-817f8c9959c5" type="audio/mpeg">
</audio>
<button onclick="playAudio(); openWin()" type="button">Play Audio</button>
<script>
var x = document.getElementById("myAudio");
function playAudio() {
[x.play](https://x.play)();
}
function openWin() {
[window.open](https://window.open)("mno.html");
}
</script>
<h2> <img src="merry\_christmas\_2018.gif" class="img-responsive" alt="NEW YEAR" ></h2>
</div>
</div>
<p aling="center" style="font-size: 15px;color:white;"><b></p>
Merry Christmas my friend!</br> Now let's party!<br></p></b></p>
<img src="15.png" height="40px" width="40px"/>
<div class="busi"><p style="text-transform: uppercase;"><br>
<img src="4.png" height="35px" width="35px"/></p>
</body>
在这里,我只给您内容,如果它是正确的,那么我在其他地方犯了错误。