Y
yawnmoth
http://www.frostjedi.com/terra/scripts/demo/this.html
'this' is defined, as I understand it, for event handlers, but why is
it defined, here?
Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>this</title>
</head>
<body>
<script type="text/javascript">
(function() {
if (this) {
alert("test exists");
} else {
alert("test doesn't exist");
}
})();
</script>
</body>
</html>
'this' is defined, as I understand it, for event handlers, but why is
it defined, here?
Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>this</title>
</head>
<body>
<script type="text/javascript">
(function() {
if (this) {
alert("test exists");
} else {
alert("test doesn't exist");
}
})();
</script>
</body>
</html>