<input id='ad' onkeyup='sc(id)'/>
<script lang="javascript">
function sc(i)
{
i.style.backgroundColor="#006400";
}
</script>
This is the code I am using to change the background colour of the input box through id, but it is not working. Please suggest some way to change the background colour of the input box.
If
iis an element id, usegetElementById()