Naresh
Naresh

Reputation: 181

html text field

which property is used for write all text for capitalize in textfield. And how? please reply

Upvotes: 0

Views: 147

Answers (2)

cHao
cHao

Reputation: 86504

There's no attribute that says "this field can only contain capital letters". What you might be able to do is add text-transform: uppercase to the CSS for the text box, but the actual value of the box will still contain mixed case.

If that's not good enough, you could add an onchange event handler that says something like this.value = this.value.toUpperCase();. That'd alter the value passed back to the server, or the value your scripts see (as opposed to the CSS, which only alters the value the user sees).

Upvotes: 1

Andrei Andrushkevich
Andrei Andrushkevich

Reputation: 9973

you can use css property "text-transform":

.myClassName {text-transform:capitalize;}

link for details

Upvotes: 1

Related Questions