faqts : Computers : Programming : Languages : JavaScript : Forms : TextAreas/TextFields

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

32 of 37 people (86%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Can I make the text in an INPUT TYPE="text" field bold?
Can I change the font weight of a text field?

Apr 25th, 2000 15:15
Martin Honnen,


NN6 and IE4+ can apply css to text fields to get a bold text:

<FORM NAME="formName">
<INPUT TYPE="text" NAME="aField" VALUE="Kibology">
<INPUT TYPE="checkbox" NAME="bold" 
       ONCLICK="if (this.checked)
                  this.form.aField.style.fontWeight = 'bold';
                else 
                  this.form.aField.style.fontWeight = 'normal';"
>
</FORM>