How to Disable Copy and Paste using jQuery

To Disable copy, paste and cut we can use jQuery bind() function.

Syntax: $(selector).bind(event,data,function,map) ;

event: this is required parameter and it specifies one or more events to attach to the element. You can add multiple events separated by space.

data: optional parameter, it specifies additional data need to pass the function.

function: It is required parameter and belong to execute function which call on event occur

map: It define an event map which contains one or more events or functions

The bind() method attaches one or more event handlers for selected elements, and specifies a function to run when the event occurs.

Disable cut, copy and paste jQuery Example:

Check below code which disable copy and paste of content inside text input field.

You can try to run the following code to disable copy paste of content using jQuery −

 

Recommended Posts For You

About Harish

I am professional web developer and blogger. Use this blog to share own api and other web development experience with you. I do accept paid work. Write to me at - [email protected]

View all posts by Harish