关于s:textfield 的css的问题

这是输入框

这个是mian.css里的样式
[color=cyan]input.focus{
border:1px solid #99BBE8;
background:#e0e9f9;
height:18px;
}
input.blur{
border:1px solid #99BBE8;
background:#FFFFFF;
height:18px;
}

input.alert{
border:1px solid #DB1111;
background:#FFC7C7;
line-height:16px;
}[/color]

我怎么编写一个css让所有的input都默认 onblur="this.className='blur'" onfocus="this.className='focus'" cssClass="blur"样式

这些时间最好用js处理嘛 css就管样式就好了。你的每个页面应该有公共的js 吧,如果你js是用的jQuery把下边代码放进去就ok了。
$(document).ready(function ($) {
$(":input").hover(
function(){
$(this).attr("class","focus");
},
function(){
$(this).attr("class","blur");
}
);
});

如果你会jQuery那你一定懂的,如果否我也不解释了就做参考吧,不过jQuery值得你一学,还是那句话最好别用css处理时间 (A标签除外)。

在struts配置文件中添加
struts.ui.theme=simple
应该就可以实现了吧,不过需要在每个text中都要添加如上的代码。

或者可以考虑修改struts默认的text样式,不知道重写是否可以覆盖默认的样式,你可以试试。