<div id="txt" style="width: 300;font-weight:bold;font-size:20pt;color:red;" 
onMouseOver="this.style.filter = 'dropshadow(color=#666666, offx=5, offy=5)'" 
onMouseOut="this.style.filter = ''">
这里的this关键字是起到什么用处? 有没有相关的解释资料

解决方案 »

  1.   

    简单地说是:当前对象,也就是div 
      

  2.   

    In JavaScript this always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of. 
    http://www.quirksmode.org/js/this.html
      

  3.   

    In JavaScript this always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of. When we define our faithful function doSomething() in a page, its owner is the page, or rather, the window object (or global object) of JavaScript. An onclick property, though, is owned by the HTML element it belongs to.