I have a function to capitalize onchange like this:
<input type="text" id="abc" name="id" onchange="capitalize()">
And function definition is as follows:
<script>
function capitalize()
{
var x= document.getElementById('abc');
x=x.toUpperCase();
document.getElementById('abc').value=x;
}
</script>
I get the error as:
Uncaught TypeError: x.toUpperCase is not a function
What changes should I make or should I include any header files?