PDA

View Full Version : How did they do this?


m1a2x3x7
07-10-2007, 01:17 PM
I came across this site and I really like there login look.

Here's a screen shot.

Now there's two thing.

1. how did they go about changing the input box and button? Is it CSS? Are they creating a style and applying it to the input box and button?

2. as you can see in the pic in user name box it says user name and in password it shows ******** and when you click on each one it disappears. I looked at the source code and found this.

onblur="if (this.value == '') { this.value = 'Username'; }"

Is this what makes it do that? Is this js?

m1a2x3x7
07-10-2007, 01:27 PM
i love answering my own question. Yes a CSS will allow me to change the input box and heres the code that allows you to get the name to appear and disappear.

onblur="if (this.value == '') { this.value = 'Username'; }" onclick="if (this.value == 'Username') { this.value = ''; }"

davidj
07-10-2007, 01:57 PM
its Javascript

domedia
07-10-2007, 03:18 PM
yes, first is CSS and second is JS.
Remember: CSS to change style and JS to manipulate document