javascript - Not allow user to select part of webpage -
i hava list name, can click show detail of each.but don't want names of list select , copy.it protect.how do?
can put transparent layer on it, or use onselectstart event,but not good
if it's esthetic because need action in javascript make weird thing selection, can disabled user selection css property:
.block { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } however, user able select content other manner: source code, deactivate css, save page on disk, etc. can't protect data being copy on internet. if want keep only, don't share on web :) see post explains subject problem.
Comments
Post a Comment