<html> <head> <title>用户信息注册</title> <style> .Item{ font-size:8px; } </style> </head> <body align="center" > <h2 >用户注册表单</h2> <form method="post" > <p>用 户 名 :<input type="text" name="user" size="12" maxlength="20" required="required" placeholder="不超过20个字"> </p> <p>昵 称 :<input type="text" name="username" size="12" maxlength="20" required="required" placeholder="不超过10个字"> </p> <p>登陆密码:<input type="password" name="password" size="12" minlength="8" required="required" placeholder="至少为8位"> </p> <p>性别: <input type="radio" name="sex"/>男 <input type="radio" name="sex"/> 女</p> <p> 联系电话: <input type="tel" name="tel" required="Required"></p> <p>电子邮件:<input type="text" name="email" required="required"></p> <p>联系地址:<input type="text" name="address" required="required"></p> <p class="Item"><input type="radio" name="item" required="requied" style="width:8px;height:8px;">同意注册项目服务条款</p> <input type="submit" value="注册"> <input type="reset" value="清除"> </form> </body> </html>
JS判断