あなたはここで任意のコードを投稿していなかったので、一例である:
<html>
<head>
<title>Start and Stop music Example</title>
<SCRIPT Language="VBScript">
Sub PlayMusic(URL)
Call DisableButton1()
Dim STRHTML
STRHTML = "<br>"
STRHTML = STRHTML & "<bgsound src="& url &" loop=""infinite"">"
MyMusic.InnerHTML = STRHTML
End Sub
'******************************************
Sub DisableButton1()
button1.disabled = True
button2.disabled = False
End Sub
'******************************************
Sub DisableButton2()
button2.disabled = True
button1.disabled = False
End Sub
'******************************************
Sub StopMusic()
Call DisableButton2()
MyMusic.InnerHTML = ""
End Sub
'******************************************
</SCRIPT>
</head>
<body>
<input type="button" name="button1" value="Start the Music" onclick='PlayMusic("http://hackoo.alwaysdata.net/Matrix.mp3")'>
<input type="button" name="button2" value="Stop the Music" onclick="StopMusic()">
<span id ="MyMusic"></span>
</body>
</html>
あなたのHTAのコードを投稿する必要がある新しいデザイン
<html>
<HTA:APPLICATION
MAXIMIZEBUTTON="no"
ICON="Winver.exe"
SCROLL="No"
SCROLLFLAT="yes"
SINGLEINSTANCE="yes"
CONTEXTMENU="no"
SELECTION="no"/>
<head>
<link rel="stylesheet" media="screen" type="text/css" title="design_encoder" href="http://hackoo.alwaysdata.net/design_encoder.css"/>
<title>Start and stop the music by Hackoo 2016</title>
<SCRIPT Language="VBScript">
'*******************************************
Sub Window_OnLoad
CenterWindow 400,220
End Sub
'*******************************************
Sub CenterWindow(x,y)
window.resizeTo x, y
iLeft = window.screen.availWidth/2 - x/2
itop = window.screen.availHeight/2 - y/2
window.moveTo ileft, itop
End Sub
'*******************************************
Sub PlayMusic(URL)
Call DisableButton1()
Dim STRHTML
STRHTML = "<br>"
STRHTML = STRHTML & "<bgsound src="& url &" loop=""infinite"">"
MyMusic.InnerHTML = STRHTML
End Sub
'******************************************
Sub DisableButton1()
button1.disabled = True
button2.disabled = False
End Sub
'******************************************
Sub DisableButton2()
button2.disabled = True
button1.disabled = False
End Sub
'******************************************
Sub StopMusic()
Call DisableButton2()
MyMusic.InnerHTML = ""
End Sub
'******************************************
</SCRIPT>
</head>
<body>
<br><br><hr>
<center><input type="button" name="button1" value="Start the Music" onclick='PlayMusic("http://hackoo.alwaysdata.net/Matrix.mp3")'>
<input type="button" name="button2" value="Stop the Music" onclick="StopMusic()">
<hr>
<span id ="MyMusic"></span>
<center>
</body>
</html>
と別のバージョン!あなたの質問を編集して投稿してください! – Hackoo