数码资讯
jQuery登陆判断简单实现代码
复制代码代码如下所示: $(# txtusername)。焦点(函数(){) $(# txtusername')瓦迩(‘); }) $(# txtpassword)。焦点(函数(){) $(# txtpassword')瓦迩(‘); }) $(# txtusername)。Blur(function
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
复制代码代码如下所示:
$(# txtusername)。焦点(函数(){)
$(# txtusername')瓦迩(‘);
})
$(# txtpassword)。焦点(函数(){)
$(# txtpassword')瓦迩(‘);
})
$(# txtusername)。Blur(function(){)
如果(美元。Val)(# txtusername ')(= =)
{
$(# txtusername)。瓦迩(用户名不为空的);
/焦点
/ / $(' # txtusername ')(重点);
}
})
$(# txtpassword)。Blur(function(){)
如果(美元。Val)(# txtpassword ')(= = {)
$(# txtpassword)。瓦迩(密码不能为空);
}
})
$(# btnsubmit)。Click(function(){)
如果($(' # txtusername)。瓦迩('admin)=(#美元txtpassword)。瓦迩(888888)= =)
{ alert('landing成功!);}
别的{ alert('failed着陆!);}
})
})
用户名 uff1a
uff1a密码
$(# txtusername)。焦点(函数(){)
$(# txtusername')瓦迩(‘);
})
$(# txtpassword)。焦点(函数(){)
$(# txtpassword')瓦迩(‘);
})
$(# txtusername)。Blur(function(){)
如果(美元。Val)(# txtusername ')(= =)
{
$(# txtusername)。瓦迩(用户名不为空的);
/焦点
/ / $(' # txtusername ')(重点);
}
})
$(# txtpassword)。Blur(function(){)
如果(美元。Val)(# txtpassword ')(= = {)
$(# txtpassword)。瓦迩(密码不能为空);
}
})
$(# btnsubmit)。Click(function(){)
如果($(' # txtusername)。瓦迩('admin)=(#美元txtpassword)。瓦迩(888888)= =)
{ alert('landing成功!);}
别的{ alert('failed着陆!);}
})
})
用户名 uff1a
uff1a密码
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。