Consider the following JavaScript function to change the color of the text box named txtName: function color(col) { document.forms[0].txtName.style.background=col } Which of the following will change the color of the text box to green, as long as the user is pressing a key?
Correct Answer: input type="text" onkeydown="color('green')" onkeyup="color('white')" name="txtName"
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More JavaScript MCQ Questions