document.getElementById("box").currentStyle 这样说正常的这样为什么就不正常了:
this.elements[0].currentStyle
this.currentStyle

解决方案 »

  1.   

    你的this是什么 指向的哪里?
      

  2.   

    你的this是什么对象先。。this都搞不清楚是什么怎么获取
      

  3.   


    这个是继承的 就类似于JQUERY $().click(function(){
        this 就类似于这样的
    })
      

  4.   

    this 是上面继承下来的
      

  5.   

    console.log(this);
      

  6.   

    先声明,我不知道这个问题是因为什么,以下是测试。
    <script>
        console.log(document.getElementsByClassName("delete"));
        console.log($(".delete"));
        $(".delete").click(function () {
            console.log(this);
            console.log($(this));
        });
    </script>
    这样打印出来的东西是这样的第一和第三是DOM对象,第二和第四是Jquery对象,但只看打印还是有不一样的。
    currentStyle是操作的DOM对象,会不会是因为这个不同报的错?
      

  7.   


    拜托我的原生的 不是jquery
      

  8.   


    拜托我的原生的 不是jquery
    哦哦~建议打印document.getElementById("box")和this.elements[0]比较是否有不同