<style>
background-color:expression((this.readOnly && this.readOnly == true)? "#FEFFD6":"");
</style>
<input type="text" name="">
<input type="text" name="" readonly>
<input type="text" name="">
<input type="text" name="" readonly>
注意:css中readonly的写法:---> readOnly (o大写)