在 2012年9月6日星期四UTC+8下午6时50分29秒,晨风楚写道:
>
> 遇到一个网页禁用鼠标左右中键怎么用js搞好
>
>
感谢各位哥哥们的回复。刚刚试过了,发现没有用。

那个网页禁用了鼠标的功能,代码如下:

<script type="text/javascript">// IE Evitar seleccion de 
textodocument.onselectstart=function(){if (event.srcElement.type != "text" && 
event.srcElement.type != "textarea" && event.srcElement.type != 
"password")return falseelse return true;};// FIREFOX Evitar seleccion de 
textoif (window.sidebar){document.onmousedown=function(e){var obj=e.target;if 
(obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == 
"TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD")return true;/*else if 
(obj.tagName=="BUTTON"){return true;}*/elsereturn false;}}// End --></script>

 

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/greasemonkey-users/-/4Iaa622GSUUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to