如题,我的代码测试在在IE6,7,8,FF下都ok,但就是IE9不行,请帮帮忙$("body").bind("contextmenu",function(){
return false;
})
$("body").bind("selectstart",function(){
with(event)
{
returnValue=false;
cancelBubble=true;
}
})
$('body').css({'-moz-user-select' : 'none'});
return false;
})
$("body").bind("selectstart",function(){
with(event)
{
returnValue=false;
cancelBubble=true;
}
})
$('body').css({'-moz-user-select' : 'none'});
<script>
$("body").bind("contextmenu",function(){
return false;
})
$("body").bind("selectstart",function(){
with(event)
{
returnValue=false;
cancelBubble=true;
}
})
$('body').css({'-moz-user-select' : 'none'});
</script>注意代码要放在最后
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="jquery-1.5.2.min.js"></script>
<script>
$(document).ready(function () {
$("body").bind("contextmenu", function () {
return false;
})
$("body").bind("selectstart", function () {
with (event) {
returnValue = false;
cancelBubble = true;
}
})
$('body').css({ '-moz-user-select': 'none' });
})
</script>
</head>
<body>
<form id="form1" runat="server">
dsasdd
</form>
</body>
</html>
ie6默默撸过
<html xmlns="http://www.w3.org/1999/xhtml" onselectstart="return false" oncontextmenu="return false" ondragstart="return false;">你可以这样试下看