电子邮件验证在jQuery中实现 [英] Email validation to implement in jQuery
本文介绍了电子邮件验证在jQuery中实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好b $ b
我有两个文本框
主电子邮件和辅助电子邮件
这里当我输入相同的电子邮件时我需要验证在这两个领域?
如何在javascript中实现这个?
请分享我的代码示例
解决方案
这是你应该做的。
在表单提交之前,假设你使用的是基于的JQuery你的标签。
(' form')。on(' submit', function (){
var pmail =
(' #pmail')。val()。trim()
var smail =
Hi
I have two textboxes
Primary email and secondary email
here I need validation when I enter same email in both fields?
How can I implement this in javascript?
please share me code samples解决方案Here's what you should do.
Before your form submits, assuming you are using JQuery based on your tag.
('form').on('submit',function() { var pmail =
('#pmail').val().trim() var smail =
这篇关于电子邮件验证在jQuery中实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文