[100分][新手问题] 帮我javascript面向对象中关于this的一个小问题,不明白!!
<%@ Page Language= "C# " AutoEventWireup= "true " CodeBehind= "WebForm1.aspx.cs " Inherits= "MapEditer.WebForm1 " %>
<!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> Untitled Page </title>
<script type= "text/javascript ">
//
DragObject = function (object)
{
//
this._object = object;
this._isStartDraging = false;
// Set Event
this._object.onmousedown = this.dragStart;
};
// dragStart
DragObject.prototype.dragStart = function()
{
alert(this._isStartDraging); // 为什么这里this._isStartDraging是 'undefined ';
};
</script>
</head>
<body>
<form id= "form1 " runat= "server ">
<div id= "div1 " style= "background-color: Green; width: 100px; height: 100px; ">
11111111111
</div>
<div id= "div2 " style= "background-color: red; width: 50px; height: 50px; ">
22222222222
</div>
</form>
<script type= "text/javascript ">
&