admin管理员组

文章数量:1323225

when we drag over an image, the image bee selected. how can i disable this selection using jquery or javascript? I am trying to create a custom image crop script. i tried e.preventDefault() but it is not working in IE6, please help

Thank you

when we drag over an image, the image bee selected. how can i disable this selection using jquery or javascript? I am trying to create a custom image crop script. i tried e.preventDefault() but it is not working in IE6, please help

Thank you

Share Improve this question edited Aug 20, 2010 at 18:06 avpaderno 29.7k17 gold badges78 silver badges94 bronze badges asked Aug 3, 2010 at 16:20 johnjohn 5357 silver badges23 bronze badges 2
  • possible duplicate of Is there a way to make text unselectable on an html page? – Pekka Commented Aug 3, 2010 at 16:23
  • The duplicate is referring to text, but the solution is 100% identical for images, too. – Pekka Commented Aug 3, 2010 at 16:24
Add a ment  | 

2 Answers 2

Reset to default 7

There are also some css properties like -webkit-user-select: none; and -moz-user-select:none

You could always just use a existing tool for that or look at the code to understand what it is you are missing.

本文标签: javascripthow to disable image selection using jQueryStack Overflow