html 的基础知识
2014-09-04 09:44
260 查看
仅供自己学习参考之用~
1.视频播放(包括html自带的 和 javascript自己实现的)
<script type="text/javascript">
function vidplay() {
var video = document.getElementById("Video1");
var button = document.getElementById("play");
if (video.paused) {
video.play();
button.textContent = "||";
} else {
video.pause();
button.textContent = ">";
}
}
function restart() {
var video = document.getElementById("Video1");
video.currentTime = 0;
}
function skip(value) {
var video = document.getElementById("Video1");
video.currentTime += value;
}
</script>
<video id="Video1" width="100%" muted autoplay controls>
<source src="source/demo.mp4" type="video/mp4" />
</video>
<div id="buttonbar">
<button id="restart" onclick="restart();">[]</button>
<button id="rew" onclick="skip(-10)"><<</button>
<button id="play" onclick="vidplay()">></button>
<button id="fastFwd" onclick="skip(10)">>></button>
</div>
2.<textarea name="yoursuggest" cols ="50" rows = "50"></textarea>
其中cols表示textarea的宽度,rows表示textarea的高度。
1.视频播放(包括html自带的 和 javascript自己实现的)
<script type="text/javascript">
function vidplay() {
var video = document.getElementById("Video1");
var button = document.getElementById("play");
if (video.paused) {
video.play();
button.textContent = "||";
} else {
video.pause();
button.textContent = ">";
}
}
function restart() {
var video = document.getElementById("Video1");
video.currentTime = 0;
}
function skip(value) {
var video = document.getElementById("Video1");
video.currentTime += value;
}
</script>
<video id="Video1" width="100%" muted autoplay controls>
<source src="source/demo.mp4" type="video/mp4" />
</video>
<div id="buttonbar">
<button id="restart" onclick="restart();">[]</button>
<button id="rew" onclick="skip(-10)"><<</button>
<button id="play" onclick="vidplay()">></button>
<button id="fastFwd" onclick="skip(10)">>></button>
</div>
2.<textarea name="yoursuggest" cols ="50" rows = "50"></textarea>
其中cols表示textarea的宽度,rows表示textarea的高度。
相关文章推荐
- HTML的基础知识
- html基础知识
- html -基础知识
- HTML:基础知识介绍和标签
- Html基础知识
- Html的表单基础知识
- html系统学习之一<基础知识,标签,元素>
- HTML的一些基础知识
- html基础知识点--表单元素及其相关知识
- html基础知识补全
- 网页制作之HTML基础知识
- HTML基础知识
- PHP编程中数组的基础知识(转自http://info.codepub.com/2008/08/info-21593.html)
- HTML 基础知识回顾
- HTML和JavaScript一些基础知识
- “阿一web标准学堂”第4课:HTML和CSS基础知识(1)(附视频、课件、代码下载)
- java基础知识记录--html javascript ajax(摘自张孝祥整理java面试题)
- HTML的基础知识(一)
- 转:HtmlElement 基础知识
- html不能忘得基础知识