programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Friday, November 7, 2014 Disabling the Right-click Menu on Image by JavaScript:

JavaScript Disabling the Right-click Menu for an Image:

Disabling the Right-click Menu on Image by JavaScript:

In this post we give example of Disable right click on web application Image. The right click protection is basically used to protect the page image or content.  

Some time we can copy the Images from the web page. But if you have   some important Images and you want to disable copy then you can use this or for the disable 'right-click' features like copy & save Image from web page.

Protect Images Using JavaScript in image:

JavaScript can use to disable right click on images, menu Firefox, in all browsers, disable right click copy paste.

JavaScript Protect the right click on Image:

Write this with the Image tag.

          oncontextmenu="return false;"

Examples of Disable right click on images in

  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="asppage.aspx.cs" Inherits="asppage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head id="Head1" runat="server">
    <title>Disable right click on web page using javascript</title>
    <style type="text/css">
            height: 230px;
            color: #990000;
            text-decoration: underline;
    <form id="form1" runat="server">     
    <div align="center">
    <h1 class="style1">Right Click Protected on Image in </h1>
    <h3>Example is here Right Click on Image and check it</h3>
    <asp:Image ID="Imag" runat="server" Height="157px"
            Width="190px" oncontextmenu="return false;" />
        <br />

        <asp:Image ID="Image1" runat="server" Height="63px"
            ImageUrl="~/bg.jpg" Width="279px" oncontextmenu="return false;" />      

Other tutorial Post :

No comments:

Post a Comment