When you need to set fields disabled or readonly at runtime, you need to keep in mind the type of field you use. Setting a HTML input field is a simple line of Javascript, however, the type of CRM field you've chosen will have an impact on exact items you need to change at runtime. I personally like the look of disabled over readonly. A disabled control will show it's value greyed, indicating to the user that they cannot modify it's contents. A readonly field appears normal. The user only finds out that they cannot change it's value until they attempt to do so.

Let's look at a few of the common types of fields:
Text and Numeric Fields (nvarchar, ntext, float, int, and money)
These types of fields are easy enough to work with. These render as a simple HTML input tags inside a table cell. The input control renders with an ID that matches the schema name. So for a field with a schema name of 'new_textfield', you can do either of the following to set it as readonly or disable it:
// set it as readonly
crmForm.all.new_textfield.readOnly = true;
// OR set it as disabled
crmForm.all.new_textfield.disabled = true;
Picklist Fields
These render as HTML select tags. You can set these as readonly and disabled the same as you can with text fields (see above).
Lookups
Things might seem complicated here, but for this purpose they are not. The control itselfs renders as a DIV and an IMG inside a table. The DIV shows the selected lookup value. This renders as a DIV to disallow any possible way to edit the value (all that is needed is the ID of the “looked-up” item anyway, the text is just for display). The IMG, of course, is the magnifying lookup image that you click to get the lookup list. Since the DIV is already uneditable by the user, all you need to worry about is the IMG. Luckily, the image will have the schema name as it's ID value so no need to dig for the info of what to change. For a lookup named 'AccountLookup' you would simply do the following:
// disable lookup field
crmForm.all.new_accountlookupid.disabled = true;
One thing to point out here is that readonly doesn't work on an IMG tag. You can only set it disabled.
Date Fields
Date fields are a little bit more tricky. As you know, the date field will render as an INPUT and IMG (for the calendar popup) inside a table. In this case, the shema name will be used as the ID for the table containing the INPUT and IMG tags, not the ID for the INPUT as you might expect. The IMG tag will render as the schema name ending in 'img'. So for a date field with schema name 'new_datefield', the IMG will have the ID of 'new_datefieldimg' and will be inside a table named 'new_datefield'. We first need to disable the IMG, just as we did for Lookup fields (see above). We can't disable the 'new_datefield' object, since that refers to the table container. We need to disable the IMG, which is named 'new_datefieldimg'. Also, you can go the extra mile and change the image to reflect the disabled look.
// disable date field
crmForm.all.new_datefieldimg.disabled = true;
crmForm.all.new_datefieldimg.src = '/_imgs/btn_dis_cal.gif';
You can always flip the image for lookups to the disabled one as well (which is a good idea IMO).
Bit Fields
For bit fields you have 3 options for display, radio buttons, a checkbox, or a picklist. For the third option, we've already discussed that (See picklist fields above). For display as a checkbox or as radio buttons your method will be the same. It is a simple matter of setting it as disabled, such as in this example using a bit field named 'new_bitfield'.
// disable bit field (as radio buttons, checkbox, or list)
crmForm.all.new_bitfield.disabled = true;