
禁止选择文字内容兼容IE,FF主流浏览器,请看下面的完整代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>禁止鼠标选中文字</title> <style type="text/css"> /*针对FF*/ .notselect{-moz-user-select:none;} </style> <script type="text/javascript"> //针对IE document.onselectstart = function() { return false; } </script> </head> <body class="notselect"> 禁止鼠标选中文字,你可以试试!!!来源:http://www.exfsoft.com </body> </html>