Please forgive me my unpleasant question, but how could you possibly write some content helping people to learn "hacking" (why, by the way?) if you unaware of the simplest basic techniques (by far, not hacks) yourself?
You can do it, for example, using this CSS:
input.hidden { color: white; background-color: white; }
Don't forget to give the class "hidden" to your input element.
You can change the class used by any element using JavaScript at any time:
myElement.className = "someOther class";
Please see:
https://developer.mozilla.org/en-US/docs/Web/API/Element/className[
^].
The same element can have several classes:
https://developer.mozilla.org/en-US/docs/Web/API/Element/classList[
^].
Also, if you choose to use jQuery, you will find that everything is already done for you.
—SA