javascript auto uppercase

Test <input type="text" onkeydown="f(this)" onkeyup="f(this)" onblur="f(this)" onclick="f(this)" />

<script type="text/javascript">
function f(o){o.value=o.value.toUpperCase().replace(/([^0-9A-Z])/g,"");}
</script>

source

Leave a Reply