Example of Html shielding right-click menu and left-click typing function

Example of Html shielding right-click menu and left-click typing function

Disable right-click menu

<body oncontextmenu=self.event.returnValue=false>

Disable left-click copy

<body onselectstart="return false">

Use CSS to control whether text can be selected

.unselectable {
  user-select: none;
}

<p>You can select me.</p>
<p class="unselectable">You can't select me!</p>

Disable right-click menu and left-click copy function

<body oncontextmenu=self.event.returnValue=false onselectstart="return false">

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

<<:  After mybatis-plus paging parameters are passed in, the sql where condition does not have limit paging information operation

>>:  Application of mapState idea in vuex

Recommend

Detailed explanation of using grep command in Linux

Linux grep command The Linux grep command is used...

Tutorial on installing MySQL database and using Navicat for MySQL

MySQL is a relational database management system ...

Detailed explanation of docker visualization graphics tool portainer

Table of contents 1. Introduction to Portainer 2....

Introduction to Linux environment variables and process address space

Table of contents Linux environment variables and...

Docker installs mysql and solves the Chinese garbled problem

Table of contents 1. Pull the mysql image 2. Chec...

Summary of 76 Experience Points of User Experience

Classification of website experience 1. Sensory e...

MySQL 8.0.12 Quick Installation Tutorial

The installation of MySQL 8.0.12 took two days an...

Detailed explanation of the use of filter properties in CSS

The filter attribute defines the visual effect of...

Refs and Ref Details in Vue3

The editor also shares with you the corresponding...

Detailed steps for installing nodejs environment and path configuration in Linux

There are two ways to install nodejs in linux. On...

Detailed explanation of how to use the Vue license plate input component

A simple license plate input component (vue) for ...

How to use yum to configure lnmp environment in CentOS7.6 system

1. Installation version details Server: MariaDB S...

Method for realizing Internet interconnection by VMware virtual machine bridging

After installing VMware and creating a new virtua...