问题
How to prevent users from dragging and dropping text inside a textarea? is there an attribute which control this or need some js code?
Want to disable drop but not to make it readonly
回答1:
What you want to do is an usability fault, but never mind...
<textarea ondrop="return false;">
I assume you don't want to disable normal typing into it.
回答2:
<textarea ondragstart="return false" ondrop="return false">
While am trying with this code,its working fine in all browsers....
回答3:
Yes the attributes name is disabled:
<textarea disabled="disabled"></textarea>
来源:https://stackoverflow.com/questions/7273883/how-to-disable-drop-text-inside-a-textarea