Double-click selected text to block double-click selected text

Source: Internet
Author: User

Double-click selected text to block double-click selected text

 

FF style:-moz-user-select: none;

For browsers other than FF, use onselectstart = "return false" (directly add the tag to be applied)

 

Eg: <div class = "test" onselectstart = "return false" style = "-moz-user-select: none;"> you cannot select me... (Hide the area where double-click the selected text) </div>


How does javascript prevent text from being selected when double-clicking, and the background turns blue?

This is the default function of the browser.
 
Is there any way to shield the mouse from double-clicking

I don't understand what you mean.
If you want to prevent others from moving your specific files, you can install them in an encrypted folder or set multiple users and add the administrator password.
Double-click the mouse to use special software. DoubleClickFix

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.