this用在指定DOM对象上,例如<a href="javascript:onclick(this)">This测试</a>,这里的this实际上就是"This测试"这个超链接。
关于作用于问题,自然是在对象内部了。还有一种类似类的用法,function Person(name, age)
{
    this.Name = name;
    this.Age = age;
}var p = new Person("Mike", 30);alert("I am " + p.Name + ", and " + p.Age + " years old!");

解决方案 »

  1.   

    谢谢,您说是this的作用域是<a>对象内吗?
      

  2.   

    我的意思是在对于我的例子来说,this就是表示a这个对象。比如<a   href="javascript:onclick(this)"> This测试 </a>,如果你不在<a>标签内写this那么他表示的就不是这个a了
      

  3.   

    上面的
    this表示触发的对象.
    当前的this就是<A>了.
      

  4.   

    this可以代表当前操作的元素对象
    比如:<input type="text" onclick="hehe(this.value)" />
    this也可以代表自己
    function hehe(id,name)
    {
      this.id=id;
      this.name=name
    }
      

  5.   

    谢谢,不过还有点茫然,请大家多多帮忙,小弟有一小例子,<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <table class="grid" id="employee">
    <caption>Employees List</caption>
    <thead>
    <tr>
    <th colspan="2" class="buttons"><a class="new" href="#" onclick="newRecord(this);" title="Add a record"><span>New</span></a></th>
    <th id="id">ID</th>
    <th id="name">Name</th>
    <th id="email">email</th>
    <th id="salary">Salary</th>
    </tr>
    </thead>
    <tbody>
    </tbody>
    </table>
    </BODY>
    </HTML>请问上面的 "this" 是指谁的对象?再次感谢!
    以上的