视频已发。截图如下:
很简单的,只需要实现一个按钮的点击方法
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>
</head>
<body><input type="button" value="播放">
</body>
<script>var btn=document.querySelector('input');btn.onclick=function () {if(btn.value == '播放'){btn.value = '暂停';}else{btn.value = '播放'}}
</script>
</html>