1,添加到head标签中去
<!-- 禁用右键 --> <script type="text/javascript"> function stop() { return false; } document.oncontextmenu = stop; </script> </head>