How does the html5 video tag block the js code saved as a right-click video
This article will explain in detail how the html5 video tag shields the js code saved as a right-click video. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
To do the video tag of HTML5, we have the download function itself, but in the video area, right-click to save the video as
To download the video, to block "Save Video as", you can add the following code to js:
The code is as follows:
$('# myVideo') .bind ('contextmenu',function () {return false;})
Where myVideo is the id of the video tag, so you can block the right-click function of the video tag area.
But you can't really block it (you know.) .
On the html5 video tag how to block the right-click video save as js code is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.