A textbook gives an example. This can refer to the caller in the called function.
the following this is div
<script>
stat = function(){
var taoId = document.getElementById("div2");
taoId.onmouseover = function{
this.align = "right";
}
taoId.onmouseout = function{
this.align = "left";
}
}
window.onload = stat;
</script>
<div id = "div2"></div>
Why doesn"t this example work? No text escape effect?