现在位置:主页>网页制作>CSS教程> 文章内容

css用expression来区分只读文本框

收藏发布更新日期:2008-11-05 点击:

#lt;style type="text/css"#gt;
#lt;!--

input{ background:expression((this.readOnly %26amp;%26amp;this.readOnly==true)?"#CCCCCC":"")}
--#gt;
#lt;/style#gt;

#lt;body#gt;
#lt;input type="text" name="" /#gt;
#lt;input type="text" name="" readonly="readonly" /#gt;

expression:处理方式:

expression(操作手法);

expression(?:)