当我打开扰流板时,如何播放.mp4视频?当我按下显示/隐藏按钮时,我希望视频开始播放!
<div id="spoiler4" style="display:none">
<h1 style="color:red;">Testing!<h1/>
</div>
<button title="Click to show/hide content" type="button" onclick="if(document.getElementById('spoiler4') .style.display=='none') {document.getElementById('spoiler4') .style.display=''}else{document.getElementById('spoiler4') .style.display='none'}">Show/hide</button>
答案 0 :(得分:0)
试试这个:
<div id="spoiler4" style="display:none">
<h1 style="color:red;">Testing!<h1/>
</div>
<button title="Click to show/hide content" type="button" onclick="$('#spoiler4').show();">Show/hide</button>