我正在创建一个视频播放器,无法通过点击我的playButton叠加层来弄清楚如何让我的视频播放。最终的目标是通过点击按钮和按钮消失来播放它,当你想暂停你点击视频并重新出现播放按钮时,但我站在那里,当我点击时我甚至无法播放视频叠加播放按钮。
<div class="wrapper">
<video class="video" id="video" loop controls onclick="playPause()">
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4" />
</video>
<div class="playButton" onclick="playPause()"></div>
</div>
脚本
var bunnyVideo = document.getElementById("video");
function playPause() {
if (bunnyVideo.paused)
{
bunnyVideo.play();
}
else
{
bunnyVideo.pause();
}
}
答案 0 :(得分:1)
如果您更改了JavaScript 加载类型 Dim strSQL as String
Dim vItm as Variant
Dim rec As DAO.Recordset
For Each vItm In Me!Listbox.ItemsSelected
strSQL = strSQL & ListBox.Column(0, vItm) & ","
Next vItm
strSQL = left(strSQL,len(strSQL) - 1) ' remove last comma
Set rec = CurrentDb.OpenRecordset("Select * FROM MyTableName " _
WHERE MyFieldName In (" & strSQL & ")")
,那么它就能正常运行。