**题目:**程序猿小明需要为公司员工的个人信息录入编写前端代码,效果如下图 需求:要保证信息录入格式正确无遗漏(输入有误要给到对应提示) 最终效果图: 代码如下:
Document
div {
background-color: lightgreen;
height: 800px;
width: 100%;
border: 1px;
overflow: hidden;
position: relative;
/* margin-left: 100px; */
}
form {
position: absolute;
margin-left: 100px;
margin-top: 100px;
}
h1 {
margin-left: 100px;
position: absolute;
}
#information {
width: 300px;
height: 500px;
position: absolute;
margin-top: 80px;
margin-left: 380px;
font-size: small;
color: grey;
line-height: 31px;
}
个人信息登记表
登录账号:
登录密码:
重复密码:
性;;;;;;别:
男;;;; 女
年;;;;;;龄:
手机号码:
邮;;;;;;箱:
学;;;;;;历:
请选择
专科
本科
硕士
博士
提交;;;;;;
重置
6-18为有效字符(字母、数字、下划线)
6-18位任意字符
重复密码与登录密码一致
必须选择一个
大于0的任意两位整数
由1开头的11位整数
有效的Email地址
必须选择一个学历选项
//账号验证函数
function checkUname() {
//取值
var uname = document.myform.uname.value;
// console.log(uname)
//判断
if (uname.match(/^\w{6,18}$/) == null)) {
alert("6-18为有效字符(字母、数字、下划线)");
return false;
}
return true;
}
//登录密码验证函数
function checkPsword() {
//取值
var pd = document.myform.psword.value;
//判断
if (pd.length>=6 && pd.length 2 || age |