$(document).ready(function(){
        
        //HTML()替换   HTML函数
        //append()追加  :input = :text,:password
            $(":text,:password").blur(function(){
            var v = $(this).val();
            $(this).next().remove();
            
            if(v==""){
                //$(this).parent().html("用户名不能为空");
                var name = $(this).attr("name");
                $(this).parent().append("<font color='red'>"+name+"不能为空");
            }
            
            });
        });

相关文章:

  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-28
  • 2021-08-22
猜你喜欢
  • 2021-07-17
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案