[Javascript] Check Email validate
Mon Jun 11, 2018 4:37 pm
- Code:
function checkEmail() {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(Xrm.Page.getAttribute("emailaddress1").getValue())) {
alert("Bạn nhập đúng rồi đó!");
Xrm.Page.getAttribute("emailaddress1").setValue("");
} else {
alert("Bạn nhập sai định dạng rồi!");
}
}
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|