How to change input background color of a textbox?

You don’t need code for that. You can do it from the editor.
Click the element.
Click the Edit icon
Design each of the states (hover, focus):

(On editorX, you should do it on the right panel.)