Event Handlers and this : General Event « Event « JavaScript DHTML
- JavaScript DHTML
- Event
- General Event
Event Handlers and this
<html>
<head>
<title></title>
<script type="text/javascript">
window.onload=setObjects;
function setObjects() {
document.personData.firstName.onblur=testValue;
}
function testValue() {
document.write(this.value);
}
</script>
</head>
<body>
<form name="personData">
First Name: <input type="text" name="firstName" />
</form>
</body>
</html>
Related examples in the same category