Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript html将输入标记更改为按钮标记_Javascript_Jquery_Html - Fatal编程技术网

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>