Javascript html将输入标记更改为按钮标记
我有一些录音机的代码,它使用输入标签来记录和停止按钮:Javascript html将输入标记更改为按钮标记,javascript,jquery,html,Javascript,Jquery,Html,我有一些录音机的代码,它使用输入标签来记录和停止按钮: <input type="button" class="start" value="Record" /> <input type="button" class="stop" value="Stop" /> 这个程序使用了其他的.js文件,所以可能需要更多关于它们的信息来回答这个问题。我尝试了以下方法,但均无效: <button onclick="start()">Record</button&g
<input type="button" class="start" value="Record" />
<input type="button" class="stop" value="Stop" />
这个程序使用了其他的.js文件,所以可能需要更多关于它们的信息来回答这个问题。我尝试了以下方法,但均无效:
<button onclick="start()">Record</button>
<button class="start">Record</button>
记录
记录
如果没有其他js,这应该是可以的,当您单击原始按钮时即为execude
<button class="start">Record</button>
<button class="stop">Stop</button>
记录
停止
您需要一个父级记录器
元素,如下所示:
<div class="recorder">
<button class="start">Record</button>
<button class="stop">Stop</button>
</div>
记录
停止
是您的记录
在.recorder
元素中吗?谢谢,但我已经试过了,它不起作用。另外,我提到还有其他的.js文件。我查看了它们,发现关于启动和停止函数的唯一内容是函数中没有任何信息。它类似于“function start(){}”,函数内部没有任何信息。
<div class="recorder">
<button class="start">Record</button>
<button class="stop">Stop</button>
</div>