<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> </head> <body> <input type="button" value="按钮" id="test"> <script type="text/javascript" src="js/jquery.min.js"></script> <script> $(document).ready(function(){ $(document).bind("contextmenu",function(e){ return false; }); }); </script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> </head> <body oncontextmenu="doNothing()"> <input type="button" value="按钮" id="test"> <script> function doNothing(){ window.event.returnValue=false; return false; } </script> </body> </html>
Me discréditer résister, peut supporter beaucoup de compliments!