disable right click on a link in visualforce
How to disable right click on a link in visualforce? I am calling the field in a object using select query where it is a lookup. So I provided onclick ="return false" but th开发者_如何学Ce link can still be opened with a right click.
Have you tried
<body oncontextmenu="return false;">
for this alongside your current code? Although it could be undone by someone in the browser bar using
javascript:void oncontextmenu(null)
or by just viewing the source of the page. I would imagine that 99% of users won't go through those hoops though.
It should also disable right click through the entire page which may be undesirable.
Paul
精彩评论