HTML5禁用默认控件 [英] HTML5 disable default controls

查看:221
本文介绍了HTML5禁用默认控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何禁用HTML5视频的Showcontrols选项。

I would like to know how do I disable the Showcontrols options for HTML5 video.

这就是我想禁用的功能:

This is what I want to disable:

我想禁用的原因是,如果我使用我的自定义控件,并且如果我将鼠标悬停,则需要显示我的自定义控件,当我离开鼠标时,它应该隐藏控件,问题是当我选择ShowControls,默认控件显示出我不想要的内容。

The reason I want to disable is that If I use my custom controls and If I mouse hover I need to show my custom controls and when I leave the mouse it should hide the controls and the problem is that when I select the ShowControls the default controls is showing up which I dont want.

任何人都可以提示我该如何处理?

Can anyone suggest me how do I procees with that?

推荐答案

var video = document.getElementById("video"); // assuming "video" is your videos' id
video.removeAttribute("controls");

例如: http://jsfiddle.net/dySyv/1/

这篇关于HTML5禁用默认控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆