The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript need javascript help [1] Reply To: need javascript help [1]


@Alen – I’m not exactly sure what you’re solving with that pen…

Regardless, in your example you don’t need Javascript at all to accomplish what you’re trying to do. Styling is what CSS is for:

input[type="text"]:focus {
    background: red;

Also there’s a proper input type for passwords:

<input type="password" placeholder="Password" />