I'm trying to update the value of a input button to the same name as before, but as uppercase. I struggle with calling the button value within the button value and keep getting errors. This is what I got now:
function updateButton(button) {
$(button).val(button.val().ToUpperCase())
}
The error I get is:
Uncaught TypeError: button.val is not a function
HTML:
<input type='button' id='btn1' value='test' class='btn' onclick='updateButton(this)'>
<input type='button' id='btn2' value='test' class='btn' onclick='updateButton(this)'>
<input type='button' id='btn3' value='test' class='btn' onclick='updateButton(this)'>
Any idea on how to update the value within itself?