有了H5的Video,妈妈再也不用担心我没安Flash插件了

根据Video提供的方法和属性,简单练习了一下,不说废话,直接上图片和代码

<html>
<head>
<title>一明播放器</title>
<style type="text/css">
*{
margin:0px;padding:0px;
}
#v1{
width:400px;
}
#divVideo{
width:400px;height:340px;border:1px solid black;margin:50px auto;
}
input[type="button"]{
width:70px;height:30px;
}
input:first-of-type{
background-color:blue;
}
input:nth-of-type(2){
background-color:red;
}
input:nth-of-type(3){
background-color:pink;
}
</style>
</head>
<body>
<div id="divVideo">
<video controls id="v1">
<source src="Intermission-Walk-in_512kb.mp4"/><br/>
</video>
<input type="button" value="暂停" id="btnPause"/>
<input type="button" value="开始" id="btnPlay"/>
<input type="button" value="重播" id="btnLoop"/>
<input type="button" value="静音" id="btnMuted"/>
</div>
</body>
</html>
<script type="text/javascript">
var btnPause=document.getElementById("btnPause");
var btnPlay=document.getElementById("btnPlay");
var btnLoop=document.getElementById("btnLoop");
var btnMuted=document.getElementById("btnMuted");
var v1=document.getElementById("v1");
v1.poster="1.jpg";
btnPause.onclick=function(){
v1.pause();
}
btnPlay.onclick=function(){
v1.play();
}
btnLoop.onclick=function(){
v1.load();
}
btnMuted.onclick=function(){
v1.muted=!v1.muted;
}
</script>

最新文章

  1. JavaWeb学习总结(五十二)——使用JavaMail创建邮件和发送邮件
  2. DB2修改表字段
  3. git操作回顾:
  4. spring事务管理学习
  5. HPROF学习
  6. gc学习(转)
  7. JavaScriptConvert.SerializeObject转换出错
  8. Nginx Access Log日志统计分析常用命令
  9. Fast Walsh-Hadamard Transform——快速沃尔什变换
  10. Tomcat中的Context.xml的&lt;Loader delegate=&quot;true&quot;/&gt;
  11. springboot~mogodb多条件拼接
  12. codeforces675D
  13. 使用VSTS的Git进行版本控制(七)——管理仓库
  14. scrapy之基础概念与用法
  15. MATLAB 显示输出数据的三种方式
  16. 大数乘法java版
  17. Java结束线程的三种方法(爱奇艺面试)
  18. java官网门户源码 SSM框架 自适应-响应式 freemarker 静态模版引擎
  19. struts2-Action配置-通配符-DMI
  20. 【Laravel】Mac下玩转Laravel

热门文章

  1. Android增加v7 appcompat源码
  2. SSIS ETL BEST PRACTICE
  3. VMware + OpenStack: 从 Plugin 到 VIO (VMware Integrated OpenStack)的演进
  4. Cg关键字(keywords)
  5. C# explicit与implicit
  6. TestLink学习一:Windows搭建Apache+MySQL+PHP环境
  7. css3d
  8. 头像上传功能实现,PC端的需要做兼容
  9. RDLC系列之二 子报表
  10. js 方法重载