javascript basics question

Posted by refge on Stack Overflow See other posts from Stack Overflow or by refge
Published on 2010-05-13T21:58:09Z Indexed on 2010/05/13 22:04 UTC
Read the original article Hit count: 163

Filed under:
|
|

i have this small javascript code which i need some help with.

    function doFocus(text) {
        if (text.value == "Enter Name") {
            text.value = "Student Name -"
        }
    }

All i need here is when someone clicks on my textbox, the text "Student Name -" should change its color, and should text-align=left. so text.color and text.align or the appropriate sytax.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about textbox