下面的代码只是隐藏了我正在播放的电影。删除元素(如果可能)或禁用它,特别是在后台播放电影。我尝试使用document.video.disabled=true;
但它不起作用。知道如何解决这个问题吗?
<script type="text/javascript">
function showHide() {
var div = document.getElementById('wrapper');
if (div.style.display == 'none') {
div.style.display = '';
}
else {
div.style.display = 'none';
}
}
<form id="searchForm" name = "searchForm" onSubmit = "return fetchResults();">
<input id="q" name="q" type="text" alt="Search" placeholder="Type here">
<input type="hidden" name="wt" value="json" />
<input id="submit" type="button" value="Search" onClick = "fetchResults();showHide();changeStyle();" />
<div id="wrapper" style="display:''">
<div id="left">
random text
</div>
<div id="right">
<video width="500" height="300" controls="controls" autoplay="autoplay" name="video">
<source src="movie.mov" type="video/mp4" />
<embed src="movie.swf" width="600" height="500" />
</object>
</video>
</div>
</div>