I'm guessing that you mean a field boundary - sounds like you might like to consider conditional formatting (In Layout Mode go Format>Conditional) whereby you can change font colour, background etc, depending on the value of that field, or another field on your layout (or indeed pretty much any related field anywhere in your solution) or a formula using a number of fields
yes, i mean to change the field color, but if i use the conditional formatting, i can't see any color in IE or firefox, so i want to use script to change it.
Conditional formatting is not supported in IWP.
You could make the text box clear, and have another box behind it - a container field. The script can set the container field to a colour specified in another global container field in your 'preferences' table, for example.
To fill a container field with color:
Enter layout mode.
Draw a rectangle on the layout. Select the desired fill color for the rectangle. Select either a zero width border or a border with the same color as your fill color.
Copy the rectangle to your clipboard
Paste the rectangle into your container field.
Used data formatting on your container field under the data field to specify enlarge or reduce and clear the "maintain proportions" check box.