Como había contestado en un mensaje anterior, se puede hacer más fácilmente con css:
Código:
<html>
<head>
<style type="text/css">
.mayus {
text-transform: uppercase;
}
</style>
</head>
<body>
<input type="text" class="mayus" />
</body>
</html>
Saludos