文件名称:Javascript Validation for email(正则表达式) 英文翻译
文件大小:30KB
文件格式:PDF
更新时间:2024-02-11 07:53:13
al ali AS
Try testing the following form with valid and invalid email addresses. The code uses javascript to match the users input with a regular expression. 函数代码: 代码如下: function validate(form_id,email) { var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; var address = document.forms[fo