我想将窗体上的所有文本框边框颜色设置为红色。我试着用设置窗体上文本框的边框颜色
$('*').css('border', 'black');
也
var all = document.getElementsByTagName('*');
for(var i=0;i<all.length;i++)
{
all[i].style.backgroundColor = "Red";
}
没有什么工作对我来说。 在CSS文件中的所有文本框
input[type=text], .htmlplusinput {
border: 1px solid #C79988;
padding:1px;
width:120px;
cursor: text;
}
input[type=text]:focus, .htmlplusinput:focus {
border:2px solid #25a3fc;
padding:0px;
}
你是否试图动态改变它们,或永远让它们变成红色? – ChiefTwoPencils 2012-07-29 21:00:02
你的选择是错误的。 – 2012-07-29 21:04:36
我想动态改变 – Judy 2012-07-29 22:29:51