This is a JavaScript function for changing the color of the text box named "txtName":
function SetColor(col)
{ document.forms[0].txtName.style.background=col }
How will you change the color of the text box txtName to green, only for the time that the user is pressing any key?
Correct Answer: <input type="text" onkeydown="SetColor('green')" onkeyup="SetColor('white')" name="txtName">
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More DHTML MCQ Questions