我想知道如何验证一个简单的表单,这是我的基本表单电子邮件,用户名,名字,姓氏和密码。我刚刚解析下载并查看了一些示例,但仍然不明白
<input id='remail' type='text' class='textinput' style="border-radius:5px; color: rgb(170, 170, 170); margin-left: 10px; margin-top: 10px; width: 266px; height: 16px; padding: 6px;" />
<input id='rusername' type='text' class='textinput' style="border-radius:5px; color: rgb(170, 170, 170); margin-left: 10px; margin-top: 10px; width: 266px; height: 16px; padding: 6px;" />
<input id='rfirstname' type='text' class='textinput' style="border-radius:5px; color: rgb(170, 170, 170); margin-left: 10px; margin-top: 10px; width: 266px; height: 16px; padding: 6px;" />
<input id='rlastname' type='text' class='textinput' style="border-radius:5px; color: rgb(170, 170, 170); margin-left: 10px; margin-top: 10px; width: 266px; height: 16px; padding: 6px;" />
<input id='rpassword' type='password' class='textinput' style="border-radius:5px; color: rgb(170, 170, 170); margin-left: 10px; margin-top: 10px; width: 266px; height: 16px; padding: 6px;" />
<input id='rcpassword' type='password' class='textinput' style="border-radius:5px; color: rgb(170, 170, 170); margin-left: 10px; margin-top: 10px; width: 175px; height: 16px; padding: 6px;" />
最佳答案
这里有一篇很好的文章:
Easily Validating Forms With Parsley JS
关于javascript - 使用ParselyJS验证表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18909310/