HTML5 Email Input Pattern Attribute

前端 未结 17 1026
时光取名叫无心
时光取名叫无心 2020-11-30 20:09

I’m trying to make a html5 form that contains one email input, one check box input, and one submit input. I\'m trying to use the pattern attribute for the email input but I

17条回答
  •  生来不讨喜
    2020-11-30 20:30

    Updated 2018 Answer

    Go here http://emailregex.com/

    Javascript:

    /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/

提交回复
热议问题