JS在本地注册表单验证存储

时间:2018-01-31 23:30:52

标签: javascript html arrays validation

我为注册表单创建了一个JS验证。我希望在本地存储5个条目,在登录时,需要访问和验证这些条目。我想用Javascript创建,是否可能?

这是我的代码:

<form name="RegistrationForm" method="post" onsubmit = " return 
 validateAndStoreRegisterForm()">

        <label class="Name">Name</label>
        <input class="NameBox" id="name" type="text" />
        <br />
        <label class="Sex">Gender</label>
        <label class="Male">Male</label>
        <input class="MaleBox" id="male" name="gender" type="radio"  value="Male"  />
        <label class="Female">Female</label>
        <input class="FemaleBox" id="female" name="gender" type="radio"  value="Female"  />
        <br />
        <label id="Contact" >Contact</label>
        <input class="ContactBox" id="contact" name="contact" type="text" />
        <br />
        <label id="MailId" >Mail Id</label>
        <input class="IdBox" id="email" name="email" type="text" />
        <br />
        <label id="RegisterPassword" >Password</label>
        <input class="PasswordBox" id="rgstrpassword" name ="rgstrpassword" 
        type="password" />
        <br />
        <label id="CreateAccount"><input type="submit" value="Create My 
         Account" /></label>

         </form>

0 个答案:

没有答案