Help changing color of text box in HTML with Javascript?

Matt D

New member
I have a text-input box. It has an onchange method attached to it that fires a function in my Javascript. The functions takes the text-input box as its argument. I want to change the color of the text-input box that called the function. Here is a snippet:

<html>
<td align=center><input onchange="check_guess(this,0,0)" type="text" name="00" style="width:15px" maxlength="1"/></td>
</html>

function check_guess (o, row, col) {
document.getElementsByName("o.name").style="background-color: #72A4D2;"
}

Why isn't the box changing color?
 
Back
Top