Home > Web Front-end > H5 Tutorial > The html5 video tag blocks the js code for right-clicking the video and saving it as_html5 tutorial skills

The html5 video tag blocks the js code for right-clicking the video and saving it as_html5 tutorial skills

WBOY
Release: 2016-05-16 15:48:42
Original
2977 people have browsed it

When making HTML5 video tags, we have the download function itself, but in the video area, right-click to "save video as",

to download the video, in order to block "save video as", you can use js Add the following code:

Copy the code
The code is as follows:

$('#myVideo ').bind('contextmenu',function() { return false; });

where myVideo is the id of the video tag, so that the right-click function of the video tag area can be blocked,

But it cannot achieve real shielding (you know...).
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template