HTML5中Video,禁止右键下载
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>LOVE</title>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">;
</script>
<script>
$(document).ready(function(){
$('#myVideo').bind('contextmenu',function() { return false; });
});
</script>
</head>
<body>
<video id="myVideo" width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
</video>
</body>
</html>
实现居中显示:
禁止右键下载:
<script>
$(document).ready(function(){
$('#myVideo').bind('contextmenu',function() { return false; });
});
</script>