如题,我的代码测试在在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'}); 

解决方案 »

  1.   

    jquery还没更新到支持IE9,建议楼主查查IE9的api,自己实现.
      

  2.   

    本帖最后由 net_lover 于 2011-04-22 15:46:32 编辑
      

  3.   

    你应该使用 jquery1.52版本的,应该是支持的
      

  4.   

    谢谢goahead777提醒,我刚查了下,最新的jquery1.5.1说是支持,我去试下
      

  5.   

    这样写是没有问题的<script src="jquery-1.5.2.min.js"></script><body>sddssd

    <script>
    $("body").bind("contextmenu",function(){
      return false;
      })
      $("body").bind("selectstart",function(){
      with(event)
      {
      returnValue=false;
      cancelBubble=true;
      }
      })
     $('body').css({'-moz-user-select' : 'none'}); 
    </script>注意代码要放在最后
      

  6.   

    <!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 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>
      

  7.   

    我晕,这个问题暂时是解决了,但出现个大麻烦,像jquery-ui-1.8.custom.js这些JS,是不是也要一点一点找最新的支持IE9的啊
      

  8.   

    ie9 太先进了
    ie6默默撸过
      

  9.   


    <html xmlns="http://www.w3.org/1999/xhtml" onselectstart="return false" oncontextmenu="return false" ondragstart="return false;">你可以这样试下看