Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的代码是一个表单验证,如果没有填写而不是使用 jquery 显示 X 错误它工作正常,但我想在错误显示我希望它以淡入淡出样式时添加。谢谢。
function error1(act,txt1){ hideshow1('error1',act); if(txt1) $('#error1').fadeIn('slow', function(txt1){ $(this).html(); }); }
尝试这个
function error1(act, txt1) { hideshow1('error1', act); if (txt1) { $('#error1').html(txt1).fadeIn('slow'); } }