Disable copy paste function in a h:inputTextarea tag JSF(2.0)
One of my clients d开发者_运维问答o not want other sites to copy paste the content of a concrete textArea. Currently i have an inputTextArea as readonly="true", but i still need to disable the copy & paste function. Any ideas?
Make your JSF code to produce following HTML, note oncopy
& onpaste
<textarea oncopy="return false;" onpaste="return false;">
Or enclose your components for which you want to disable copy & paste within following div
<div oncopy="return false;" onpaste="return false;">
<!-------Your component should go here ---->
</div>
精彩评论