右键点击嵌入在asp.net中的youtube视频 [英] Right click off on youtube video embed in asp.net

查看:61
本文介绍了右键点击嵌入在asp.net中的youtube视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net页面上有youtube视频。我想要右键单击关闭,以便没有人可以下载它。请帮助我。我试过了

I have youtube video in asp.net page. I want right click off so that nobody can download it. plz help me. I have tried

<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
    </script>
    <script type="text/javascript" language="javascript">
        $(function () {
            $(this).bind("contextmenu", function (e) {
                e.preventDefault();
            });
        });
    </script>



这是我页面的head部分。它阻止了对其他内容的右键单击而不是视频。


this in head section of my page. It is preventing right click on other things but not on video.

推荐答案

(function(){
(function () {


(this)。 bind(contextmenu,function(e){
e.preventDefault();
});
});
< / script >
(this).bind("contextmenu", function (e) { e.preventDefault(); }); }); </script>



这是我页面的head部分。这是阻止右键点击其他内容而不是视频。


this in head section of my page. It is preventing right click on other things but not on video.


嗨Dhanashree



请参考以下链接:

http://stackoverflow.com / questions / 9756837 / prevent-html5-video-from-being-downloaded-right-click-saved [ ^ ]



问候

Willington
Hi Dhanashree

Please refer to the below link:
http://stackoverflow.com/questions/9756837/prevent-html5-video-from-being-downloaded-right-click-saved[^]

Regards
Willington


这篇关于右键点击嵌入在asp.net中的youtube视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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