<html>
<head>
<title>Text Object DefaultValue</title>
<script type="text/javascript">
function upperMe(field) {
field.value = field.value.toUpperCase();
}
function resetField(form) {
form.converter.value = form.converter.defaultValue;
}
</script>
</head>
<body>
<form onsubmit="window.focus(); return false">
Lowercase letters:
<input type="text" id="convert" name="converter" value="sample" onchange="upperMe(this)" />
<input type="button" id="reset" value="Reset Field" onclick="resetField(this.form)" />
</form>
</body>
</html>
|